Skip to content

Create a simple, univariate linear regression model that predicts the salary from a person's experience (measured in years), using the gradiant descent algorithm.

License

Notifications You must be signed in to change notification settings

kul-arun/univariate-linear-regression

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Univariate Linear Regression

In this project, we create a simple linear regression model that predicts the salary from a person's experience (measured in years), using the gradiant descent algorithm. The data that we work with is taken from Kaggle (https://www.kaggle.com/datasets/krishnaraj30/salary-prediction-data-simple-linear-regression).

Installation

  • Python

Install Python 3.9 or higher. Create a virtual environment with:

python3 -m venv <virtual-environment-name>

Example: To create a virtual environment called linear-regression, use

python3 -m venv linear-regression

Activate the virtual environment with:

source <path-to-virtual-environment>/bin/activate

The virtual environment can be deactivated with:

deactivate
  • Jupyter Notebook

Install Jupyter Notebook with:

pip install notebook

To run the notebook:

jupyter notebook
  • Additional Requirements

Install the necessary packages listed in requirements.txt via:

pip install -r requirements.txt

About

Create a simple, univariate linear regression model that predicts the salary from a person's experience (measured in years), using the gradiant descent algorithm.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published