Predicting salary based on years of experience using a Simple Linear Regression model. Built as part of my machine learning fundamentals practice.
- Salary_Data.csv - 30 records with two columns: Years of Experience and Salary
- 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
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.
Python, Pandas, NumPy, Matplotlib, Scikit-learn, Jupyter Notebook
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.ipynbAyush Saini