This is a data analysis project on the AutoMPG dataset using an IPython Notebook for exploratory analysis, data preprocessing, and machine learning modeling to predict the fuel consumption in km/l of vehicles.
autompg.ipynb
: The main project file containing the Python code for data analysis and modeling.autompg.csv
: The dataset used in the project, containing information about vehicles and their fuel consumption.
- Python 3
- Jupyter Notebook
- Python libraries: pandas, numpy, scikit-learn, matplotlib
- Clone the repository to your computer:
git clone https://github.com/kirksahdo/fuel-consumption-neural-networks.git
- Open the
autompg.ipynb
file in a Jupyter Notebook environment. - Execute the code cells in the notebook to perform data analysis and modeling.
- The linear regression model achieved an R² of 0.898, indicating that it explains about 89.8% of the variability in the data.
- The single-layer MLP model obtained a negative R², suggesting that it is performing worse than a model that predicts only the mean of the response variable.
- The MLP model with two hidden layers achieved an R² of 0.948, indicating that it explains about 94.8% of the variability in the data.
Based on the results, the MLP model with two hidden layers seems to be the most suitable for this problem, as it has the highest R² and appears to be capturing the patterns in the data better.