Skip to content

This repository contains code for a Polynomial Regression model trained to predict the salary based on position levels.

Notifications You must be signed in to change notification settings

abubakrshykh/Polynomial_Regression-Position-Salaries

Repository files navigation

Polynomial-Regression-Position-Salaries-

This repository contains code for a Polynomial Regression model trained to predict the salary based on position levels.

Polynomial Regression Model

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.

Prerequisites

The following packages need to be installed before running the code:

NumPy Pandas Matplotlib Scikit-learn

Dataset

The dataset used in this project is available in the following file:

Position_Salaries.csv

Results

The trained model achieves an accuracy score of accuracy score and an R2 score of R2 score on the test dataset.

Visualization

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.

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

About

This repository contains code for a Polynomial Regression model trained to predict the salary based on position levels.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published