Skip to content

MJAHMADEE/MLP_Regression

Repository files navigation

MLP Regression for Car Price Prediction 🚗💰

Python PyTorch Machine Learning

This repository contains a Multilayer Perceptron (MLP) regression model to predict car prices based on various features like make, model, engine size, etc., using the PyTorch framework.

Features 🌟

  • Implements MLP regression models with varying depths and complexities to predict car prices.
  • Uses the CarPrice_Assignment dataset for training and testing the models.
  • Includes comprehensive preprocessing, normalization, and encoding of the dataset.
  • Provides performance evaluation through Mean Squared Error (MSE) and R2 Score metrics.
  • Contains visualization of loss and R2 Score over training epochs.

Setup and Installation 🛠️

  1. Clone the repository.
  2. Install the required Python packages listed in requirements.txt.
  3. Download and preprocess the dataset using the provided scripts.

Data Preprocessing 📊

  • Data normalization and cleaning to handle missing values and outliers.
  • Encoding of categorical features to numeric values for model training.
  • Data split into training, validation, and test sets for model evaluation.

Model Training 🚀

  • Models with different configurations (MLP1, MLP2, MLP3) are trained to find the best architecture.
  • Uses Adam and Adagrad optimizers with varying learning rates to optimize the models.
  • Saves the best model based on validation performance.

Results and Evaluation 📊

  • Evaluation on test data to measure MSE and R2 Score.
  • Visualization of model performance through loss and R2 Score plots.
  • Detailed comparison of predicted vs. actual prices on test samples.

Contributing 🤝

Contributions to improve the project and implement new features are welcome. Please fork the repository, make your changes, and submit a pull request.

License 📜

The project is licensed under the MIT License. See the LICENSE file for more details.

Acknowledgements 🙌

  • Dataset providers for making the car price dataset publicly available.
  • The PyTorch team for providing a powerful and user-friendly deep learning framework.

For more information and to view the source code, visit the GitHub repository.

Releases

No releases published

Packages

No packages published