This repository contains Python code for performing regression analysis on a dataset using various machine learning models. The code includes implementations for artificial neural networks (ANN), ridge regression, lasso regression, elastic net, support vector regression (SVR), decision tree regression, random forest regression, gradient boosting regression, XGBoost, LightGBM, k-nearest neighbors (KNN), Gaussian processes, Bayesian regression, isotonic regression, Huber regression, quantile regression, and Theil-Sen regression.
- Python 3.x
- Required Python packages: pandas, seaborn, plotly, numpy, xgboost, scikit-learn, matplotlib, pickle, lightgbm
The code assumes that the dataset is stored in a CSV file named train.csv
. Ensure that the dataset is available before running the code.
-
Clone the repository:
git clone https://github.com/your_username/your_project.git
-
Install the required packages:
pip3 install -r requirements.txt
-
Run the analysis:
python3 main.py
-
Follow the on-screen instructions to choose the analysis type.
-
Analysis: Generates graphs for the dataset, including a line plot and a violin plot.
-
ANN (Artificial Neural Network): Trains an MLPRegressor model and evaluates its performance.
-
Ridge Regression: Trains a Ridge regression model and evaluates its performance.
-
Lasso Regression: Trains a Lasso regression model and evaluates its performance.
-
Elastic Net: Trains an Elastic Net regression model and evaluates its performance.
-
SVR (Support Vector Regression): Trains an SVR model and evaluates its performance.
-
Decision Tree Regression: Trains a decision tree regression model and evaluates its performance.
-
Random Forest Regression: Trains a random forest regression model and evaluates its performance.
-
Gradient Boosting Regression: Trains a gradient boosting regression model and evaluates its performance.
-
XGBoost: Trains an XGBoost regression model and evaluates its performance.
-
LightGBM: Trains a LightGBM regression model and evaluates its performance.
-
KNN (k-nearest neighbors): Trains a KNN regression model and evaluates its performance.
-
Gaussian Processes: Trains a Gaussian Process regression model and evaluates its performance.
-
Bayesian Regression: Trains a Bayesian Ridge regression model and evaluates its performance.
-
Isotonic Regression: Trains an isotonic regression model and evaluates its performance.
-
Huber Regression: Trains a Huber regression model and evaluates its performance.
-
Quantile Regression: Trains a quantile regression model and evaluates its performance.
-
Theil-Sen Regression: Trains a Theil-Sen regression model and evaluates its performance.
Choose the desired analysis type by entering the corresponding number when prompted.
Graphs generated during the analysis are saved in the graphs
directory with filenames corresponding to the analysis type (e.g., graphs/ann.png
, graphs/ridge_regression.png
, etc.).
This project is licensed under the MIT License - see the LICENSE file for details.
Feel free to customize this template based on your specific needs. Include additional information or sections as necessary.