This project aims to predict salary based on various features using a Machine Learning model. It utilizes a Random Forest Regressor trained on a dataset containing over 10,000 data points. The app.py
file serves as the main entry point for accessing the prediction model.
The project structure is organized as follows:
- data/ # Folder containing the dataset
- salary_dataset.csv # Dataset used for training and testing
- models/ # Folder containing trained model(s)
- random_forest_regressor.pkl # Pre-trained Random Forest Regressor model
- app.py # Main application file for prediction
- requirements.txt # List of project dependencies
- README.md # Documentation (You are reading this!)
- EDA_SalaryModel.ipynb
- Salary_prediction.ipynb
-
Clone the Repository:
git clone https://github.com/chandankr014/Salary-Prediction.git
-
Install Dependencies:
pip install -r requirements.txt
-
Run the Application:
To start the salary prediction application, use the following command:
python app.py
-
Access the Application:
Open a web browser and navigate to
http://localhost:5000
to access the salary prediction interface.
-
Input Data:
Provide the necessary input features such as years of experience, min salary, maximum salary, etc., in the provided input fields.
-
Predict Salary:
Click the "Predict" button to generate a salary prediction based on the input data.
-
View Result:
The predicted salary will be displayed on the screen.
If you wish to retrain the model with updated data, follow these steps:
-
Place the updated dataset in the
csv
files. -
Modify the data loading and preprocessing steps in the
app.py
file to use the new dataset. -
Retrain the model using the updated data.
-
Save the trained model as
random_forest_regressor.pkl
in themodels/
directory.
- Python 3.x
- scikit-learn
- Flask (for the web application)
This project is licensed under the MIT License - see the LICENSE file for details.
- Chandan Kumar
- Contact: chandankr014@email.com