Skip to content

Machine-Learning from simple regression to deep learning neural networks

Notifications You must be signed in to change notification settings

vahidinj/Machine_Learning

Repository files navigation

Machine Learning

  • This repository houses a diverse collection of machine learning projects and examples, ranging from simple regression models to more sophisticated techniques like neural networks.
  • Additionally, I’ll introduce other concepts such as pipelines, grid search, MLflow, and others.

Projects

1. Simple Regression

This project demonstrates a simple linear regression model to determine CO2 emissions based on vehicle features.

Files

  • simple_regression.py: Contains the code for loading data, preprocessing, building, and evaluating a simple linear regression model.

Usage

  1. Clone the repository:

    git clone https://github.com/vahidinj/Machine_Learning.git
    cd Machine_Learning
  2. Install the required dependencies:

    pip install -r requirements.txt
  3. Run the simple_regression.py script:

    python simple_regression.py

2. Multiple Regression

This project demonstrates a multiple linear regression model to predict CO2 emissions based on multiple vehicle features.

Files

  • multiple_regression.py: Contains the code for loading data, preprocessing, building, and evaluating a multiple linear regression model.

Usage

  1. Clone the repository:

    git clone https://github.com/vahidinj/Machine_Learning.git
    cd Machine_Learning
  2. Install the required dependencies:

    pip install -r requirements.txt
  3. Run the multiple_regression.py script:

    python multiple_regression.py

3. Multiple Regression with Pipeline

This project demonstrates a multiple linear regression model using a pipeline to predict CO2 emissions based on multiple vehicle features.

Files

  • multiple_regression_pipeline.py: Contains the code for loading data, preprocessing, building, and evaluating a multiple linear regression model using a pipeline.

Usage

  1. Clone the repository:

    git clone https://github.com/vahidinj/Machine_Learning.git
    cd Machine_Learning
  2. Install the required dependencies:

    pip install -r requirements.txt
  3. Run the multiple_regression_pipeline.py script:

    python multiple_regression_pipeline.py

4. Logistic Regression

This project demonstrates a logistic regression model to determine who is more likely to leave a company.

Files

  • logistic_regression.py: Contains the code for loading data, preprocessing, building, and evaluating a logistic regression model.

Usage

  1. Clone the repository:

    git clone https://github.com/vahidinj/Machine_Learning.git
    cd Machine_Learning
  2. Install the required dependencies:

    pip install -r requirements.txt
  3. Run the logistic_regression.py script:

    python logistic_regression.py

5. Multi-Class Classification

This project demonstrates a multi-class classification model to predict obesity risk using logistic regression.

Files

  • multi-class_classification.py: Contains the code for loading data, preprocessing, building, and evaluating a multi-class classification model using logistic regression.

Usage

  1. Clone the repository:

    git clone https://github.com/vahidinj/Machine_Learning.git
    cd Machine_Learning
  2. Install the required dependencies:

    pip install -r requirements.txt
  3. Run the multi-class_classification.py script:

    python multi-class_classification.py

6. Decision Tree Classifier

This project demonstrates a decision tree classifier to determine which drug to choose based on patient features.

Files

  • decision_tree_classifier.py: Contains the code for loading data, preprocessing, building, and evaluating a decision tree classifier model.

Usage

  1. Clone the repository:

    git clone https://github.com/vahidinj/Machine_Learning.git
    cd Machine_Learning
  2. Install the required dependencies:

    pip install -r requirements.txt
  3. Run the decision_tree_classifier.py script:

    python decision_tree_classifier.py

7. K-Nearest Neighbors (KNN) Classifier

This project demonstrates a K-Nearest Neighbors (KNN) classifier to predict service category (custcat).

Files

  • KNN.py: Contains the code for loading data, preprocessing, building, and evaluating a K-Nearest Neighbors classifier model and cross validation.

8. K-Means Clustering

This project demonstrates a K-Means clustering model for customer segmentation based on historical data.

Files

  • K-Means.py: Contains the code for loading data, preprocessing, building, and evaluating a K-Means clustering model.

Usage

  1. Clone the repository:

    git clone https://github.com/vahidinj/Machine_Learning.git
    cd Machine_Learning
  2. Install the required dependencies:

    pip install -r requirements.txt
  3. Run the K-Means.py script:

    python K-Means.py

Machine Learning

This repository contains various machine learning projects and examples, starting with simple regression models and eventually including more advanced techniques such as neural networks.

Projects

1. Simple Regression

This project demonstrates a simple linear regression model to determine CO2 emissions based on vehicle features.

Files

  • simple_regression.py: Contains the code for loading data, preprocessing, building, and evaluating a simple linear regression model.

Usage

  1. Clone the repository:

    git clone https://github.com/vahidinj/Machine_Learning.git
    cd Machine_Learning
  2. Install the required dependencies:

    pip install -r requirements.txt
  3. Run the simple_regression.py script:

    python simple_regression.py

2. Multiple Regression

This project demonstrates a multiple linear regression model to predict CO2 emissions based on multiple vehicle features.

Files

  • multiple_regression.py: Contains the code for loading data, preprocessing, building, and evaluating a multiple linear regression model.

Usage

  1. Clone the repository:

    git clone https://github.com/vahidinj/Machine_Learning.git
    cd Machine_Learning
  2. Install the required dependencies:

    pip install -r requirements.txt
  3. Run the multiple_regression.py script:

    python multiple_regression.py

3. Multiple Regression with Pipeline

This project demonstrates a multiple linear regression model using a pipeline to predict CO2 emissions based on multiple vehicle features.

Files

  • multiple_regression_pipeline.py: Contains the code for loading data, preprocessing, building, and evaluating a multiple linear regression model using a pipeline.

Usage

  1. Clone the repository:

    git clone https://github.com/vahidinj/Machine_Learning.git
    cd Machine_Learning
  2. Install the required dependencies:

    pip install -r requirements.txt
  3. Run the multiple_regression_pipeline.py script:

    python multiple_regression_pipeline.py

4. Logistic Regression

This project demonstrates a logistic regression model to determine who is more likely to leave a company.

Files

  • logistic_regression.py: Contains the code for loading data, preprocessing, building, and evaluating a logistic regression model.

Usage

  1. Clone the repository:

    git clone https://github.com/vahidinj/Machine_Learning.git
    cd Machine_Learning
  2. Install the required dependencies:

    pip install -r requirements.txt
  3. Run the logistic_regression.py script:

    python logistic_regression.py

5. Multi-Class Classification

This project demonstrates a multi-class classification model to predict obesity risk using logistic regression.

Files

  • multi-class_classification.py: Contains the code for loading data, preprocessing, building, and evaluating a multi-class classification model using logistic regression.

Usage

  1. Clone the repository:

    git clone https://github.com/vahidinj/Machine_Learning.git
    cd Machine_Learning
  2. Install the required dependencies:

    pip install -r requirements.txt
  3. Run the multi-class_classification.py script:

    python multi-class_classification.py

6. Decision Tree Classifier

This project demonstrates a decision tree classifier to determine which drug to choose based on patient features.

Files

  • decision_tree_classifier.py: Contains the code for loading data, preprocessing, building, and evaluating a decision tree classifier model.

Usage

  1. Clone the repository:

    git clone https://github.com/vahidinj/Machine_Learning.git
    cd Machine_Learning
  2. Install the required dependencies:

    pip install -r requirements.txt
  3. Run the decision_tree_classifier.py script:

    python decision_tree_classifier.py

7. K-Nearest Neighbors (KNN) Classifier

This project demonstrates a K-Nearest Neighbors (KNN) classifier to predict service category (custcat).

Files

  • KNN.py: Contains the code for loading data, preprocessing, building, and evaluating a K-Nearest Neighbors classifier model and cross validation.

Usage

  1. Clone the repository:

    git clone https://github.com/vahidinj/Machine_Learning.git
    cd Machine_Learning
  2. Install the required dependencies:

    pip install -r requirements.txt
  3. Run the KNN.py script:

    python KNN.py

8. K-Means Clustering

This project demonstrates a K-Means clustering model for customer segmentation based on historical data.

Files

  • K-Means.py: Contains the code for loading data, preprocessing, building, and evaluating a K-Means clustering model.

Usage

  1. Clone the repository:

    git clone https://github.com/vahidinj/Machine_Learning.git
    cd Machine_Learning
  2. Install the required dependencies:

    pip install -r requirements.txt
  3. Run the K-Means.py script:

    python K-Means.py

9. KNN with PCA and Hyperparameter Tuning using GridSearchCV

This project demonstrates the use of a machine learning pipeline to classify the Iris dataset using K-Nearest Neighbors (KNN) with Principal Component Analysis (PCA) for dimensionality reduction. The pipeline is optimized using GridSearchCV to find the best hyperparameters.

Files

  • KNN_GridSearchCV.py: Contains the code for loading data, preprocessing, building, and evaluating a K-Nearest Neighbors classifier model with PCA and hyperparameter tuning using GridSearchCV.

Usage

  1. Clone the repository:

    git clone https://github.com/vahidinj/Machine_Learning.git
    cd Machine_Learning
  2. Install the required dependencies:

    pip install -r requirements.txt
  3. Run the KNN_GridSearchCV.py script:

    python KNN_GridSearchCV.py

10. Artificial Neural Network (ANN) with MLflow

This project demonstrates the use of an Artificial Neural Network (ANN) to predict customer churn. The model is integrated with MLflow for experiment tracking, logging metrics, and saving artifacts.

Files

  • ann_mlflow.py: Contains the code for loading data, preprocessing, building, training, and evaluating an ANN model. It also logs metrics, confusion matrix, and classification report using MLflow.
  • Data for this model is stored in `Churn_Modelin.csv

Usage

  1. Clone the repository:

    git clone https://github.com/vahidinj/Machine_Learning.git
    cd Machine_Learning
  2. Install the required dependencies:

    pip install -r requirements.txt
  3. Run the ann_mlflow.py script:

    python ann_mlflow.py
  4. View the MLflow UI to track experiments:

    mlflow ui

    Open http://localhost:5000 in your browser to view the logged metrics and artifacts.

Future Projects

  • convolutional neural networks (CNN)
  • Updated folder/file structure

Requirements

  • Python 3.x
  • Required Python packages (listed in requirements.txt)

Contributing

Contributions are welcome! Please feel free to submit a pull request or open an issue. Any feedback is also very welcomed and encouraged.

Requirements

  • Python 3.x
  • Required Python packages (listed in requirements.txt)

Contributing

Contributions are welcome! Please feel free to submit a pull request or open an issue. Any feedback is also very welcomed and encouraged.

About

Machine-Learning from simple regression to deep learning neural networks

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages