CoolFace
Apppublic

Venkatakrishnan-Ramesh/OperationalML

sourceHugging Faceopenrailupdated 3y agoView on Hugging Face
0likes
Readme.md92 linesDownload Raw Back to root
1ntroduction2 3The OperationalML App is a machine learning profiler application designed to help developers and data scientists optimize and improve the performance of their machine learning models. The app works by analyzing the input data and output predictions of a model, and providing insights and recommendations to improve its accuracy, speed, and efficiency.4Functional Requirements5Requirement 1: Upload Dataset6 7The user should be able to upload a dataset to be analyzed by the OperationalML App. Upon uploading, the dataset should be stored locally and displayed to the user for review.8 9python10 11if choice == "Upload":12    st.title("Upload Your Dataset")13    file = st.file_uploader("Upload Your Dataset")14    if file: 15        df = pd.read_csv(file, index_col=None)16        df.to_csv('dataset.csv', index=None)17        st.dataframe(df)18 19Requirement 2: Exploratory Data Analysis20 21The user should be able to perform exploratory data analysis on the uploaded dataset. The app should use pandas_profiling to generate a report on the dataset and display it to the user.22 23python24 25if choice == "Profiling": 26    st.title("Exploratory Data Analysis")27    profile_df = df.profile_report()28    st_profile_report(profile_df)29 30Requirement 3: Modelling31 32The user should be able to choose a target column from the uploaded dataset and run a machine learning model on it. The app should use pycaret for modelling and should allow the user to compare different models to choose the best one. The best model should be saved as a .pkl file.33 34python35 36if choice == "Modelling": 37    chosen_target = st.selectbox('Choose the Target Column', df.columns)38    if st.button('Run Modelling'): 39        def Encoder(df):40          columnsToEncode = list(df.select_dtypes(include=['category','object']))41          le = LabelEncoder()42          for feature in columnsToEncode:43              try:44                  df = le.fit_transform(df)45              except:46                  print('Error encoding '+feature)47          return df48        df.astype(float)49        df.dropna(inplace=True)50        setup(df, target=chosen_target)51        setup_df = pull()52        st.dataframe(setup_df)53        best_model = compare_models()54        compare_df = pull()55        st.dataframe(compare_df)56        save_model(best_model, 'best_model')57 58Requirement 4: Download Model59 60The user should be able to download the best model as a .pkl file for future use.61 62python63 64if choice == "Download": 65    with open('best_model.pkl', 'rb') as f: 66        st.download_button('Download Model', f, file_name="best_model.pkl")67 68Non-Functional Requirements69Requirement 1: Performance70 71The OperationalML App should be able to analyze large datasets and run machine learning models efficiently, without causing significant delays or crashes.72Requirement 2: User Interface73 74The user interface of the OperationalML App should be user-friendly and intuitive, allowing users with limited technical knowledge to use the app without difficulty.75Requirement 3: Security76 77The OperationalML App should be secure and protect user data from unauthorized access or modification.78System Requirements79 80The OperationalML App requires the following system requirements:81 82    Python 3.7 or higher83    streamlit84    plotly85    pandas_profiling86    pycaret87    streamlit_pandas_profiling88    scikit-learn89 90Conclusion91 92The OperationalML App is a machine learning profiler application designed to help developers and data scientists optimize and improve the performance of their machine learning models. The app is user-friendly,