Skip to content

kunalk3/P1_tmlc_n2o_streamlit_v2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

N2O predictions application with Explainable AI

This repository is a part of TMLC project with end-to-end machine learning pipeline with deployment using PaaS on streamlit. Here, we have use the concept of Explainable AI in which whatever the ML application predicts, we are able to see real time input values with its feature contributions, its impact on model, behaviour and summary in detail with.

Project title: Machine learning improves predictions of an Agricultural Nitrous Oxide (N2O) emissions from intensively managed cropping systems.

  • For N2O predictions, we have used ML model with Xgb regressor algorithm and for user data analysis, wo go with Auto EDA (pandas_profiling tool). Application is integrated using Hydralit package for responsive and animated navbar, theme components in deployment using streamlit.
  • An idea with data is taken from a published paper in Environmental Research Research Paper (Paper published 19 January 2021) *C

Windows Visual Studio Code Jupyter Pycharm Colab Spyder Streamlit

LinkedIn Badge Github Badge Gmail Badge Facebook Badge Instagram Badge


💡 Demo

🔖 Output -

N2O.predictions.application.with.Explainable.AI.mp4

🔧 Installation

  • Create virtual environment python -m venv VIRTUAL_ENV_NAME and activate it .\VIRTUAL_ENV_NAME\Scripts\activate.
  • Install necessary library for this project from the file requirements.txt or manually install by pip.
    pip install -r requirements.txt
    
    To create project library requirements, use below command,
    pip freeze > requirements.txt
    
  • Libraries that are used in this project (highlighted few)
    import pandas as pd
    import matplotlib.pyplot as plt
    import streamlit as st
    import streamlit.components.v1 as components
    import shap
    from sklearn.metrics import r2_score, mean_squared_error
    from pandas_profiling import ProfileReport
    from streamlit_pandas_profiling import st_profile_report
    import pybase64, joblib


🔖 Directory Structure

    .                                               # Root directory
    ├── data                                        # Input data directory
    │   ├── Dataset.csv                             # Dataset used for Xgb model
    │   ├── sample_data.csv                         # Sample input data
    ├── Model                                       # Model directory
    │   ├── model_xgb_61_final.joblib.compressed    # Model (Xgb regressor)
    ├── apps                                        # Application directory
    │   ├── app1.py                                 # Single prediction with AI
    │   ├── app2.py                                 # Predictions on user data with AI
    │   ├── app3.py                                 # UI enhancement
    │   ├── app4.py                                 # Connect page
    ├── .streamlit                                  # Streamlit theme param directory
    │   ├── config.toml                             # Configurarion theme file
    ├── requirements.txt                            # Project requirements library with versions
    ├── README.md                                   # Project README file
    └── LICENSE                                     # Project License file

☁️ Live Application

Live Aplication is running on streamlit cloud platform, you can access from below.

Open in Streamlit


📱 Connect with me

You say freak, I say unique. Don't wait for an opportunity, create it.

Let’s connect, share the ideas and feel free to ping me...

kunalkolhe3 kunalkolhe3 kunal.kolhe.98 kunalkolhe333 kkunalkkolhe kunalkolhe333

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages