{"id":18250372,"url":"https://github.com/qtle3/polynomial-regression","last_synced_at":"2025-04-08T20:27:23.318Z","repository":{"id":253491464,"uuid":"843240528","full_name":"qtle3/polynomial-regression","owner":"qtle3","description":"This project demonstrates the use of both Linear and Polynomial Regression models to predict salaries based on the position level of employees. By using a dataset that contains position levels and their corresponding salaries, this project showcases the differences between linear and polynomial models in fitting data and making predictions.","archived":false,"fork":false,"pushed_at":"2024-08-21T04:14:32.000Z","size":12,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-14T16:01:50.672Z","etag":null,"topics":["data-visualization","linear-regression","model-comparison","polynomial-regression","salary-prediction"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/qtle3.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-16T04:42:49.000Z","updated_at":"2024-08-21T04:14:35.000Z","dependencies_parsed_at":"2024-08-17T05:38:50.396Z","dependency_job_id":"4d356278-0bf4-4deb-81c6-f8f4c2ced884","html_url":"https://github.com/qtle3/polynomial-regression","commit_stats":null,"previous_names":["qtle3/polynomial-regression"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qtle3%2Fpolynomial-regression","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qtle3%2Fpolynomial-regression/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qtle3%2Fpolynomial-regression/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qtle3%2Fpolynomial-regression/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qtle3","download_url":"https://codeload.github.com/qtle3/polynomial-regression/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247921491,"owners_count":21018601,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-visualization","linear-regression","model-comparison","polynomial-regression","salary-prediction"],"created_at":"2024-11-05T09:44:30.548Z","updated_at":"2025-04-08T20:27:23.297Z","avatar_url":"https://github.com/qtle3.png","language":"Python","readme":"# Salary Prediction using Linear and Polynomial Regression\n\nThis project demonstrates the use of both Linear and Polynomial Regression models to predict salaries based on the position level of employees. By using a dataset that contains position levels and their corresponding salaries, this project showcases the differences between linear and polynomial models in fitting data and making predictions.\n\n## Detailed Summary\n\nThe script starts by importing a dataset containing employee position levels and their salaries. It implements both **Linear Regression** and **Polynomial Regression** models to predict salaries based on position level. The project compares the performance of the two models by visualizing their results, highlighting how polynomial regression can provide a more flexible and accurate fit for non-linear data.\n\nThe script performs the following steps:\n\n1. **Data Preprocessing:** Loads the dataset and splits it into independent variable (position level) and dependent variable (salary).\n2. **Linear Regression Model:** Trains a linear regression model on the entire dataset and visualizes the results with a regression line.\n3. **Polynomial Regression Model:** Transforms the input features into polynomial features and trains a polynomial regression model (degree 4) on the entire dataset.\n4. **Visualization:** The script visualizes the results for both models, showing the difference in how linear and polynomial regression fits the data. Additionally, a higher resolution plot is created for polynomial regression to smooth the curve.\n5. **Prediction:** The script makes predictions for a position level of 6.5 using both the linear and polynomial regression models and outputs the predicted salaries.\n\n## Key Concepts Covered\n\n- **Linear Regression:** A basic regression technique that models the relationship between independent and dependent variables by fitting a straight line.\n- **Polynomial Regression:** An extension of linear regression where the independent variable is transformed into a polynomial, allowing for better fit in cases where the data is not linearly distributed.\n- **Model Comparison:** The project demonstrates the limitations of linear regression when modeling non-linear data and how polynomial regression provides a more accurate fit.\n- **Data Visualization:** Visualizations are created to compare the two models and better understand their predictions, including a high-resolution plot for a smoother polynomial regression curve.\n- **Salary Prediction:** The script predicts salaries for a position level of 6.5 using both models and compares the predictions.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqtle3%2Fpolynomial-regression","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqtle3%2Fpolynomial-regression","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqtle3%2Fpolynomial-regression/lists"}