Predict Instagram user engagement using Machine Learning, advanced feature engineering, lifestyle analytics, and an AI-powered recommendation assistant.
Instagram engagement depends on multiple lifestyle, behavioral, and social media factors. Instead of relying only on follower count or likes, this project combines health metrics, activity patterns, lifestyle habits, and Instagram usage statistics to predict whether a user's engagement level is Low, Medium, or High.
The project also includes a modern Streamlit dashboard and an AI assistant powered by Google Gemini that provides personalized creator growth recommendations.
- Predict Instagram engagement level.
- Analyze user lifestyle and social media behavior.
- Build a production-ready Machine Learning model.
- Deploy an interactive Streamlit dashboard.
- Generate personalized AI-powered creator advice.
The dataset contains Instagram usage statistics together with user lifestyle and health information.
- User demographics
- Followers & Following
- Instagram activity
- Reels and Stories usage
- Physical activity
- Sleep patterns
- BMI
- Blood pressure
- Diet quality
- Stress and happiness scores
- Social interactions
- Privacy settings
- Premium subscription status
Target Variable:
Engagement Level
- ๐ด Low
- ๐ก Medium
- ๐ข High
- Python
- Pandas
- NumPy
- LightGBM
- Scikit-learn
- Plotly
- Matplotlib
- Seaborn
- Streamlit
- Google Gemini API
- Joblib
Dataset
โ
โผ
Data Cleaning
โ
โผ
Feature Engineering
โ
โผ
Encoding
โ
โผ
Log Transformation
โ
โผ
Train-Test Split
โ
โผ
LightGBM Training
โ
โผ
Model Evaluation
โ
โผ
Model Saving
โ
โผ
Streamlit Deployment
โ
โผ
Google Gemini AI Assistant
Several custom features were created to improve predictive performance.
- Sleep Category
- BMI Category
- Blood Pressure Category
- Health Index
- Activity Ratio
- Activity Efficiency
- Follower Ratio
- Social Score
- Social Activity
- Life Balance
- Log transformation for highly skewed variables
- One-Hot Encoding
- Ordinal Encoding
- Binary Encoding
- Leakage feature removal
Model Used:
โ LightGBM Classifier
Configuration
- 300 Estimators
- Learning Rate = 0.05
- Max Depth = 8
- Num Leaves = 31
Evaluation Metrics
- Accuracy
- Classification Report
- Confusion Matrix
- Train Accuracy
- Test Accuracy
The project includes an interactive web application where users can:
- Adjust creator profile information.
- Predict engagement level instantly.
- View engagement probabilities.
- Explore interactive charts.
- Analyze creator metrics.
- Receive AI-powered growth suggestions using Google Gemini.
- ๐ Engagement Probability Chart
- ๐ Creator Analytics Cards
- ๐ Radar Chart
- ๐ค AI Prediction Panel
- ๐ก Personalized AI Creator Assistant
- ๐ Modern Dark Theme UI
Instagram-Engagement-AI
โ
โโโ app.py
โโโ model.pkl
โโโ model_columns.pkl
โโโ style.css
โโโ requirements.txt
โโโ instagram_usage_lifestyle.csv
โโโ notebook.ipynb
โโโ README.md
โโโ images/
Clone Repository
git clone https://github.com/yourusername/Instagram-Engagement-AI.gitInstall Dependencies
pip install -r requirements.txtRun Application
streamlit run app.pyThe application integrates Google Gemini to provide:
- Personalized Instagram growth strategies.
- Engagement improvement recommendations.
- Creator performance insights.
- AI-generated answers to user questions.
- End-to-End Machine Learning Pipeline
- Advanced Feature Engineering
- LightGBM Classification Model
- Interactive Streamlit Dashboard
- Plotly Visualizations
- AI Creator Assistant
- Real-time Engagement Prediction
- Professional Dark Theme Interface
- Deep Learning Models
- SHAP Explainability
- User Authentication
- Cloud Deployment
- Instagram API Integration
- Automated Retraining Pipeline
Special thanks to the open-source community and the developers of:
- Streamlit
- Scikit-learn
- LightGBM
- Plotly
- Google Gemini API
- Pandas
- NumPy
Their tools made the development of this project possible.