Skip to content

A Streamlit web app that predicts whether a person is an introvert or extrovert based on behavioral data using a Random Forest classifier.

Notifications You must be signed in to change notification settings

anikchand461/personality-predictor

Repository files navigation

🧠 Personality Predictor - Introvert vs Extrovert

A Streamlit web app that predicts whether a person is an introvert or extrovert based on behavioral traits using a Random Forest Classifier.

🔗 Live Demo

👉 Click to Try the App


📌 Features

  • Takes in 4 simple inputs:

    • Social event attendance
    • Frequency of going outside
    • Social media post frequency
    • Friends circle size
  • Predicts personality type: Introvert 🪫 or Extrovert 🎉

  • Built with:

    • Python 🐍
    • Scikit-learn
    • Streamlit
    • Joblib

🧪 Dataset Info

  • Source: Kaggle Dataset

  • 2900 rows × 8 columns

  • Preprocessing steps:

    • Converted categorical variables to binary (Yes/No → 1/0)
    • Selected features with positive correlation to target
    • Imputed missing values using SimpleImputer
    • Used Random Forest for classification

⚙️ How to Run Locally

1. Clone the Repository

git clone https://github.com/your-username/personality-predictor.git
cd personality-predictor

2. Install Requirements

pip install -r requirements.txt

3. Run Streamlit App

streamlit run app.py

📁 File Structure

├── app.py                # Main Streamlit app
├── personality_model.pkl # Trained Random Forest model
├── requirements.txt      # Python dependencies
└── README.md             # Project documentation

📊 Model Performance

  • ✅ Accuracy: 90.3%
  • 📈 R² Score: 0.62
  • ✔️ Trained using RandomForestClassifier from Scikit-learn

📄 License

This project is licensed under the MIT License.


🙇‍♂️ Author

Developed by Anik Chand

🔗 LinkedIn | GitHub

About

A Streamlit web app that predicts whether a person is an introvert or extrovert based on behavioral data using a Random Forest classifier.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published