Skip to content
Proyectos

miguelestradam3/logistic_regression_with_smote

Ver en GitHub

Acerca de

This project demonstrates how to build a machine learning model that predicts a person's personality type based on a set of input characteristics.

IA y aprendizaje automático

Cómo se miden estas cifras

What you can do

  • Exploratory Data Analysis (EDA)
  • Data visualization with Seaborn
  • Label encoding for categorical data
  • Feature standardization

Crecimiento de estrellas medido

in 24h
0
in 7 days
0
in 15 days
Recopilando historial
in 1 month
Recopilando historial

Cambios netos en períodos que se solapan, no totales diarios. Los datos no disponibles se dejan en blanco. Las estrellas indican interés, no calidad.

README.md

Original

🧠 Personality Type Classification using Machine Learning

This project demonstrates how to build a machine learning model that predicts a person's personality type based on a set of input characteristics. The notebook follows a complete machine learning workflow, including data exploration, preprocessing, handling class imbalance, model training, and evaluation using Logistic Regression.


📌 Features

  • Exploratory Data Analysis (EDA)
  • Data visualization with Seaborn
  • Label encoding for categorical data
  • Feature standardization
  • Class imbalance handling using SMOTE
  • Train/Test split
  • Logistic Regression classifier
  • Model evaluation using multiple classification metrics

🛠 Technologies Used

  • Python
  • Pandas
  • NumPy
  • Matplotlib
  • Seaborn
  • Scikit-learn
  • imbalanced-learn (SMOTE)
  • Jupyter Notebook

📚 Libraries

pandas
numpy
matplotlib
seaborn
scikit-learn
imbalanced-learn

📊 Dataset

The project uses a synthetic personality dataset containing various personal attributes used to classify an individual's personality type.

The dataset includes multiple input features and a target variable:

  • Personality Type (Target Variable)

Categorical labels are converted into numerical values using LabelEncoder before model training.


⚙️ Machine Learning Workflow

The notebook performs the following steps:

  • Load the dataset
  • Explore and visualize the data
  • Encode categorical labels
  • Split the dataset into training and testing sets
  • Standardize features using StandardScaler
  • Balance the training data using SMOTE
  • Train a Logistic Regression model
  • Generate predictions
  • Evaluate model performance

📈 Model Evaluation

The model is evaluated using:

  • Accuracy Score
  • Precision Score
  • Recall Score
  • ROC-AUC Score
  • Confusion Matrix
  • Classification Report
  • ROC Curve

These metrics provide a comprehensive assessment of the classifier's performance.


🚀 Getting Started

Install dependencies

pip install -r requirements.txt

Or install them manually:

pip install pandas numpy matplotlib seaborn scikit-learn imbalanced-learn

▶️ Running the Project

Launch Jupyter Notebook:

jupyter notebook

Open:

main.ipynb

Run the notebook cells sequentially to reproduce the complete machine learning workflow.


🎯 Learning Objectives

This project demonstrates how to:

  • Perform exploratory data analysis
  • Encode categorical variables
  • Standardize numerical features
  • Handle imbalanced datasets using SMOTE
  • Train a Logistic Regression classifier
  • Evaluate classification models using multiple performance metrics
  • Interpret ROC curves and confusion matrices

Explorar proyectos relacionados

Cargando…