0% found this document useful (0 votes)
6 views10 pages

Simple Linear Regression Overview

Simple linear regression finds the linear relationship between a dependent and independent variable. It uses the equation y=ax+b, where y is the dependent variable, x is the independent variable, a is the slope coefficient, and b is the y-intercept constant. The document demonstrates simple linear regression by importing a dataset on salary and experience, separating the variables, splitting the data into training and test sets, creating a linear regression model, and plotting the training and test data.

Uploaded by

DEVIL DEMON
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views10 pages

Simple Linear Regression Overview

Simple linear regression finds the linear relationship between a dependent and independent variable. It uses the equation y=ax+b, where y is the dependent variable, x is the independent variable, a is the slope coefficient, and b is the y-intercept constant. The document demonstrates simple linear regression by importing a dataset on salary and experience, separating the variables, splitting the data into training and test sets, creating a linear regression model, and plotting the training and test data.

Uploaded by

DEVIL DEMON
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

SIMPLE LINEAR

REGRESSION

KSI Microsoft AEP [Link]


SIMPLE LINEAR REGRESSION

Co-efficient

Simple y=a*x+b Constant


Linear
Regression
Independent
Dependent variable
variable

KSI Microsoft AEP [Link]


Salary

10k

30k

1 yr Experience

KSI Microsoft AEP [Link]


IMPORTING THE LIBRARIES

KSI Microsoft AEP [Link]


IMPORTING THE DATA SET

KSI Microsoft AEP [Link]


SEPARATING INDEPENDENT AND DEPENDENT
VARIABLE

KSI Microsoft AEP [Link]


SPLITTING THE PREVIOUS DATA INTO TRAIN AND TEST
DATA AND CREATING LINEAR REGRESSION MODEL

KSI Microsoft AEP [Link]


PLOTTING THE TRAIN DATA

KSI Microsoft AEP [Link]


PLOTTING THE TEST DATA

KSI Microsoft AEP [Link]


THANK YOU

KSI Microsoft AEP [Link]

You might also like