This project builds a Machine Learning model to predict employee salaries based on demographic, educational, and professional attributes. The workflow covers data cleaning, exploratory data analysis (EDA), preprocessing, model training, evaluation, and prediction.
The goal is to demonstrate an end to end Machine Learning pipeline using Python and Scikit-learn.
The dataset contains information about employees, including:
- Age
- Gender
- Education Level
- Job Title
- Years of Experience
- Salary (Target Variable)
- Load dataset using Pandas
- Explore dataset structure
- Handle missing values
- Check for duplicate records
- Validate data types
- Salary distribution
- Gender distribution
- Education level analysis
- Salary vs Experience analysis
- Correlation analysis
- Job title analysis
- Missing value imputation
- One Hot Encoding for categorical features
- Train Test Split
- Scikit-learn Pipelines
- Linear Regression
- Random Forest Regressor
- R² Score
- Mean Absolute Error (MAE)
- Root Mean Squared Error (RMSE)
- Identify the most influential features affecting salary predictions
- Predict salary for new employee records
- Python
- NumPy
- Pandas
- Matplotlib
- Seaborn
- Scikit-learn
- Jupyter Notebook
salary-prediction-ml/
├── data/
│ └── Salary Data.csv
├── notebooks/
│ └── Salary_Prediction_Workflow.ipynb
├── images/
├── README.md
├── requirements.txt
└── .gitignore
The models were evaluated using multiple regression metrics. Random Forest achieved better predictive performance compared to Linear Regression and was selected as the final model.
- Years of Experience is the strongest predictor of salary.
- Higher education levels generally lead to higher salaries.
- Job title significantly impacts salary predictions.
- Proper preprocessing improves model performance.
- Hyperparameter Tuning
- Cross Validation
- XGBoost Implementation
- Model Deployment with Streamlit
- Automated Model Tracking
Hamza Ali Malik
BS Computer Science
Aspiring Data Scientist & Machine Learning Engineer
LinkedIn: Hamza Malik
GitHub: @hazmaali9708