This repository contains code for a Polynomial Regression model trained to predict the salary based on position levels.
This repository contains the code for a Polynomial Regression model developed to predict the salary based on position levels. The model is trained using the Position_Salaries.csv dataset. The model uses the degree 4 polynomial function to fit the data.
The following packages need to be installed before running the code:
NumPy Pandas Matplotlib Scikit-learn
The dataset used in this project is available in the following file:
Position_Salaries.csv
The trained model achieves an accuracy score of accuracy score and an R2 score of R2 score on the test dataset.
The following visualizations are produced by the model:
Scatter plot of training data with linear regression line (Position Level vs Salary) Scatter plot of training data with polynomial regression line (Position Level vs Salary) Scatter plot of test data with polynomial regression line (Position Level vs Salary) Manual Prediction The model can also predict the salary for a given position level using the "predict" method. An example is provided in the code.
This project is licensed under the MIT License - see the LICENSE.md file for details.