Skip to content

Prediction of happy Customers based on Happiness Survey Data

License

Notifications You must be signed in to change notification settings

venkat-a/Happiness-Prediction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

Machine Learning Model Selection and Tuning

This repository # f2jZd474bSyeUsM0 contains Python code for selecting, tuning, and evaluating machine learning models on a dataset. The code utilizes popular machine learning algorithms and techniques for parameter tuning to improve model performance. The models included in this repository are:

  1. XGBoost Classifier
  2. Random Forest Classifier
  3. Gradient Boosting Classifier
  4. Support Vector Classifier (SVC)
  5. Logistic Regression

Dataset

The code uses a dataset from ACME Corporation's Happiness Survey 2020 (ACME-HappinessSurvey2020.csv) for training and testing the machine learning models. The dataset consists of features and a target variable 'Y' representing happiness levels.

Usage

  1. Clone this repository to your local machine:

    git clone https://github.com/your-username/machine-learning-model-selection.git
  2. Install the required Python libraries. You can use the following command to install the dependencies:

    pip install -r requirements.txt
  3. Run the Jupyter Notebook or Python scripts for each model. The code is organized into separate blocks for each model, allowing you to choose and run a specific model of interest.

  4. The code performs the following steps for each model:

    • Data preprocessing, including feature scaling.
    • Stratified K-Fold cross-validation for hyperparameter tuning using GridSearchCV.
    • Training the final model with the best hyperparameters.
    • Evaluating the model's accuracy on a test dataset.
  5. After running the code for each model, you can compare the validation and test accuracies to assess model performance.

Results

The results of the model selection and tuning process are provided in the form of accuracy scores for each model on the test dataset. Additionally, the code generates a bar chart to visualize the comparison of validation and test accuracies among different models.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • The dataset used in this project is sourced from ACME Corporation's Happiness Survey 2020.
  • The code leverages the scikit-learn library for machine learning tasks.

Feel free to customize this README file with additional information, explanations, and usage instructions specific to your project.