CoolFace
Apppublic

SamarthPujari/employee_salary_predictor

sourceHugging Faceapache-2.0updated 1y agoView on Hugging Face
1likes
App README

๐Ÿง  Employee Salary Prediction โ€“ IBM Internship Project

This repository contains the implementation of an Employee Salary Prediction System, developed during my IBM Internship under the Artificial Intelligence role. The project predicts whether an individual earns >50K or <=50K annually based on demographic and professional attributes.


๐Ÿš€ Project Overview

During the internship, I built an end-to-end ML system that:

  • โ€”Uses data preprocessing and feature engineering to handle real-world employee data.
  • โ€”Trains multiple machine learning models and combines them using ensemble learning for improved performance.
  • โ€”Deploys a Streamlit-based web application that provides both single and batch predictions with user-friendly visualizations.

๐Ÿ“‚ Repository Structure

bash
.
โ”œโ”€โ”€ Dataset/
โ”‚   โ””โ”€โ”€ adult.csv                         # Adult Income Dataset
โ”œโ”€โ”€ Images/
โ”‚   โ””โ”€โ”€ Employee.png                      # Visual asset for the app
โ”œโ”€โ”€ Model/
โ”‚   โ””โ”€โ”€ Model Information.txt             # Model summary and notes
โ”œโ”€โ”€ Skillsbuild Certificates/
โ”‚   โ”œโ”€โ”€ Artificial Intelligence - credly.pdf
โ”‚   โ”œโ”€โ”€ Edunet-Learning Plan Completion.pdf
โ”‚   โ””โ”€โ”€ Edunet-Orientation Certificate.pdf
โ”œโ”€โ”€ sample_batch.csv                      # Example CSV for batch predictions
โ”œโ”€โ”€ Employee_Salary_Prediction.ipynb      # Full Jupyter notebook (EDA to model)
โ”œโ”€โ”€ app.py                                # Streamlit application
โ”œโ”€โ”€ requirements.txt                      # Python dependencies
โ””โ”€โ”€ README.md                             # Project documentation (this file)

๐Ÿ” Features

  • โ€”โœ… Preprocessing: Handles missing values, encodes categoricals, and normalizes inputs.
  • โ€”๐Ÿ“Š Visualizations: ROC, Precision-Recall Curves, Pie charts, Class distributions.
  • โ€”๐Ÿ“ˆ Models: Logistic Regression, Random Forest, SVM + Voting Ensemble.
  • โ€”๐Ÿ“ Batch prediction: Upload CSV for multi-row prediction.
  • โ€”๐Ÿงพ Real-time prediction summary and model confidence.

๐Ÿ How to Run

1. Clone the Repository

bash
git clone https://github.com/Samarth4023/IBM-Internship.git
cd IBM-Internship

2. Install Dependencies

bash
pip install -r requirements.txt

3. Run the Streamlit App

bash
streamlit run app.py

๐Ÿ“Œ Model Performance

โœ… Final Ensemble Results:

MetricTraining SetTest Set
Accuracy93.89%85.68%
F1 Score (>50K)0.870.68
Precision (>50K)0.940.76
Recall (>50K)0.800.62
  • โ€”๐Ÿ“Œ High precision ensures fewer false positives in predicting high earners (>50K).
  • โ€”๐Ÿ“Š Training accuracy shows strong learning capability without overfitting.
  • โ€”๐Ÿง  Macro F1 Score (Test): 0.79, indicating fair balance across classes.
Ensemble model outperforms individual base models with better generalization and robust prediction confidence.

๐Ÿ“š Learning Outcomes

  • โ€”Hands-on experience with data pipelines, model training, and app deployment
  • โ€”Understanding of bias handling, model evaluation, and user experience design
  • โ€”Deployment-ready ML app using Streamlit, Pandas, Scikit-learn, and Joblib

๐Ÿง‘โ€๐Ÿซ Mentor Experience

Working under the guidance of industry professionals at IBM helped me sharpen both my technical and communication skills, with regular reviews and constructive feedback loops.


๐Ÿ”ฎ Future Scope

  • โ€”Integrate deep learning models for better performance
  • โ€”Add explainability using SHAP or LIME
  • โ€”Enable API-based access for external systems
  • โ€”Extend model to predict salary ranges, not just binary outcomes

๐Ÿ™Œ Acknowledgements

๐Ÿ‘ค Author

Samarth Pujari

AI Intern @ IBM

Connect with me on LinkedIn | Kaggle