This repository contains a Jupyter notebook that predicts CO2 emissions in Rwanda using machine learning. The notebook imports a dataset of historical CO2 emissions data and uses a variety of machine learning models to predict future emissions. The best model is then selected and used to generate predictions for the next year.
# CO2 Emission Prediction in Rwanda
This Jupyter Notebook presents a data analysis and machine learning project focused on predicting CO2 emissions in Rwanda. The notebook explores various data preprocessing steps, feature engineering, model selection, and evaluation techniques to create a predictive model for CO2 emissions.
## Table of Contents
- Introduction
- Dependencies
- Dataset
- Methodology
- Importing Libraries
- Reading and Exploring Data
- Data Preprocessing
- Exploratory Data Analysis (EDA)
- Feature Engineering
- Model Selection
- Model Training and Evaluation
- Conclusion
- Usage
- Acknowledgments
- License
## Introduction
The purpose of this project is to develop a machine learning model that predicts CO2 emissions in Rwanda. The project involves a comprehensive data analysis, including data preprocessing, exploratory data analysis, feature engineering, and the selection of suitable machine learning algorithms.
## Dependencies
The following Python libraries are required to run this notebook:
- pandas
- numpy
- geopandas
- shapely
- folium
- matplotlib
- seaborn
- scikit-learn
- xgboost
- lightgbm
- fasteda
- optuna
- haversine
You can install these dependencies using the following command:
```bash
pip install pandas numpy geopandas shapely folium matplotlib seaborn scikit-learn xgboost lightgbm fasteda optuna haversine
```
## Dataset
The dataset for this project consists of CSV files: 'train.csv' and 'test.csv'. These files contain relevant features and CO2 emission values that are used for training and evaluating the predictive model.
## Methodology
### Importing Libraries
The initial step involves importing necessary Python libraries for data analysis, visualization, and modeling.
### Reading and Exploring Data
The provided CSV files are read into dataframes using the `pandas` library. Exploratory data analysis techniques are applied to understand the dataset's characteristics and structure.
### Data Preprocessing
Data preprocess …