Skip to content

Ayush28042005/Simple-Linear-Regression

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Simple Linear Regression - Salary Prediction

Predicting salary based on years of experience using a Simple Linear Regression model. Built as part of my machine learning fundamentals practice.

Dataset

  • Salary_Data.csv - 30 records with two columns: Years of Experience and Salary

What I Did

  • Loaded and explored the dataset
  • Split data into training and test sets (80/20)
  • Trained a Linear Regression model using Scikit-learn
  • Predicted salaries on the test set
  • Visualised the regression line against actual data points

Results

The model fits the data well - salary shows a strong positive linear relationship with years of experience. The regression line closely follows the actual data points on both training and test sets.

Tech Stack

Python, Pandas, NumPy, Matplotlib, Scikit-learn, Jupyter Notebook

How to Run

git clone https://github.com/Ayush28042005/Simple-Linear-Regression.git
cd Simple-Linear-Regression
pip install pandas numpy matplotlib scikit-learn
jupyter notebook simple-linear-regression.ipynb

Author

Ayush Saini

About

Predicting salary from years of experience using Simple Linear Regression - built with Scikit-learn, Pandas and Matplotlib.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors