This repository contains code for predicting salaries based on years of experience using simple linear regression.
The code provided in this repository demonstrates how to train a simple linear regression model to predict salaries based on the number of years of experience. It includes:
- Loading a dataset of salaries and years of experience.
- Splitting the dataset into training and testing sets.
- Training a linear regression model on the training data.
- Evaluating the model's performance on the testing data.
- Visualizing the results using matplotlib.
To run the code, you need to have Python installed on your system along with the following libraries:
- NumPy
- pandas
- matplotlib
- scikit-learn
You can install these dependencies using pip:
pip install numpy pandas matplotlib scikit-learn
### Usage
Clone the repository:
git clone https://github.com/your-username/Linear_Regression_Salary_Prediction.git
Navigate to the project directory:
cd Linear_Regression_Salary_Prediction