Simple Linear Regression Project: Predicting salaries based on years of experience
This project demonstrates a simple linear regression implementation. The model predicts salary based on years of experience using a dataset of salary information.
The notebook contains the following sections:
- Importing Libraries: Utilizes NumPy, Matplotlib, and Pandas for data manipulation and visualization.
- Importing Dataset: Loads the 'Salary_Data.csv' dataset.
- Splitting Dataset: Divides the data into training and test sets.
- Training the Model: Implements a simple linear regression model using Scikit-learn.
- Making Predictions: Uses the trained model to predict salaries on the test set.
- Visualization:
- Training set results visualization
- Test set results visualization
- Preparing dataset for linear regression
- Clean implementation of linear regression
- Data visualization using Matplotlib
- Model evaluation on test data
- Comparison of training vs test results
The project uses 'Salary_Data.csv' which contains:
- Years of Experience (independent variable)
- Salary (dependent variable)
- Open the notebook in Google Colab or Jupyter Notebook
- Ensure the 'Salary_Data.csv' file is in the same directory
- Run all cells sequentially
- Observe the regression line fitting and predictions
The model shows the relationship between years of experience and salary, with visualizations demonstrating how well the linear regression line fits both training and test data.
This project is open source and available under the MIT License.