Emissions Predictor Using MLR is a machine learning application that uses a Multiple Linear Regression (MLR) model to predict carbon dioxide emissions (g/km) of a vehicle based on multiple features like engine size, fuel consumption, and other vehicle characteristics. This project demonstrates how to build, train, evaluate, and deploy a regression model using Python and Streamlit.
- Multiple Linear Regression (MLR) Model: Accurate prediction of CO2 emissions using multiple features.
- Interactive User Interface: Built using Streamlit for an easy-to-use experience.
- Real-Time Predictions: Adjust features like engine size and fuel consumption to get instant CO2 emission predictions.
- Data Visualization: Displays visualizations to understand the relationships between vehicle features and CO2 emissions.
- Python: Core programming language.
- Streamlit: Framework for creating the interactive web application.
- Scikit-learn: Machine learning library used for training the MLR model.
- Matplotlib: For data visualization.
- Pandas: For data manipulation and analysis.
- Input Features: Use the sliders to select features like engine size and fuel consumption.
- Real-Time Prediction: The app instantly predicts the CO2 emissions based on the input.
- Visualize Data: See scatterplots and other visualizations to understand the relationship between features and emissions.
📦 Emissions-Predictor-using-MLR
├── app.py
├── mlr_model.pkl
├── ridge_tuned_model.pkl
├── scaler.pkl
├── CO2 Emissions Predictor using MLR.ipynb
├── README.md
├── vehicle_data.csv
├── requirements.txt
├── LICENSE
├── banner_md.jpeg
├── icons8-github-50.png
- Python 3.8 or higher installed on your machine.
git clone https://github.com/ashishpatel8736/Emissions-Predictor-using-MLR.git
cd CO2-Emissions-Predictor
Ensure you have Python installed. Run the following to install the required libraries:
pip install -r requirements.txt
Run the Streamlit app:
streamlit run app.py
http://localhost:8501
Here is an example of the dataset used for training the SLR model:
Engine Size (L) | Fuel Consumption (L/100km) | CO2 Emissions (g/km) |
---|---|---|
1.5 | 6.5 | 145 |
2.0 | 7.0 | 185 |
3.0 | 8.5 | 250 |
4.0 | 9.0 | 320 |
5.0 | 10.5 | 400 |
- Add support for more input features, such as vehicle weight or fuel type.
- Implement model optimization techniques like cross-validation for better accuracy.
- Add support for uploading custom datasets.
- Provide downloadable results and summary reports.
Contributions are welcome! If you'd like to contribute, please:
- Fork the repository.
- Create a feature branch.
- Submit a pull request.
- Scikit-learn for providing robust machine learning tools.
- Streamlit for enabling easy deployment of ML apps.
- Pandas and Matplotlib for data manipulation and visualization.
This project is licensed under the MIT License - see the LICENSE file for details.