A machine learning application that predicts salaries based on personal and professional attributes such as age, gender, education level, job title, and years of experience.
This project uses a Random Forest Regression model to predict salaries based on various inputs. The application is built with a machine learning backend (scikit-learn) and a user-friendly frontend (Streamlit) for easy interaction.
The predictions are made in Indian Rupees (₹) and the model is trained on a dataset of professional attributes and corresponding salaries.
- Machine Learning Model: Trained Random Forest Regressor for salary prediction
- Hyperparameter Tuning: Uses GridSearchCV for model optimization
- Data Preprocessing: Handles both numerical and categorical data
- User-friendly Interface: Easy-to-use Streamlit web application
- Visualizations: Display of model performance metrics
- Instant Predictions: Real-time salary estimates based on user inputs
/home/Maanu/Documents/Salary_Prediction/
│
├── model.py # ML model training and evaluation code
├── app.py # Streamlit frontend application
├── requirements.txt # Project dependencies
├── run.sh # Script to run the application
├── Salary Data.csv # Training dataset
├── salary_prediction_model.pkl # Saved trained model
├── actual_vs_predicted.png # Model performance visualization
└── README.md # Project documentation
- Python 3.8 or higher
- Git
git clone https://github.com/maanu-v/Salary_Prediction.git
cd Salary_PredictionUsing pip:
pip install -r requirements.txtUsing uv (recommended for faster installation):
uv pip install -r requirements.txt-
Make the run script executable:
chmod +x run.sh
-
Start the application:
./run.sh
-
Access the web interface:
- The application will automatically open in your default web browser
- If not, visit http://localhost:8501
-
Enter your information in the form:
- Age
- Gender
- Education Level
- Job Title
- Years of Experience
-
Click "Predict Salary" to get an estimate
-
View the prediction and model insights
The model is trained on a dataset with the following features:
- Age
- Gender
- Education Level
- Job Title
- Years of Experience
Target variable:
- Salary (in ₹)
The Random Forest Regressor model achieves:
- R² Score: ~0.87 (may vary slightly with different runs)
- Feature importance analysis is available in the app interface
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Made with ❤️ by Manasa