0% found this document useful (0 votes)
131 views34 pages

Cs3491 - Aiml - Unit III - Linear Regression Models

Uploaded by

Soban
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)
131 views34 pages

Cs3491 - Aiml - Unit III - Linear Regression Models

Uploaded by

Soban
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
You are on page 1/ 34

Department of Computer Science &

Engineering

Regulation 21

Semester: III

Course Code: CS3491

Course Name: Artificial Intelligence and Machine Learning

K.Sumithra Devi
Assistant Professor
CSE
1
KCG DEPARTMENT OF CSE 1
UNIT III SUPERVISED LEARNING – LINEAR REGRESSION MODELS

CO 3 Build supervised learning models

K3

KCG DEPARTMENT OF CSE 2


Linear Regression Models

• Linear regression analysis is used to predict the value of a


variable based on the value of another variable.

• The variable you want to predict is called the dependent


variable.

• The variable you are using to predict the other variable's


value is called the independent variable.
• Regression analysis is widely used for Prediction and
forcasting.

KCG DEPARTMENT OF CSE 3


Linear regression model represents the linear relationship between a dependent variable and independent
variable(s) via a sloped straight line.

KCG DEPARTMENT OF CSE 4


Linear Regression

KCG DEPARTMENT OF CSE 5


Linear Regression Models

KCG DEPARTMENT OF CSE 6


KCG DEPARTMENT OF CSE 7
TOTAL SUM OF SQUARE

KCG DEPARTMENT OF CSE 8


KCG DEPARTMENT OF CSE 9
KCG DEPARTMENT OF CSE 10
Lines differentiating factor is slope and
Intercept
i.e m and b
Take the best fit line and find if hours=7 then
what is the mark?
Hours=7 and mark=85.

So depends on m and b value there are many


possibilities of model.

KCG DEPARTMENT OF CSE 11


Linear Regression

KCG DEPARTMENT OF CSE 12


Linear Regression

KCG DEPARTMENT OF CSE 13


KCG DEPARTMENT OF CSE 14
KCG DEPARTMENT OF CSE 15
KCG DEPARTMENT OF CSE 16
COST FUNCTION

17
KCG DEPARTMENT OF CSE 17
18
KCG DEPARTMENT OF CSE 18
Cost Function

To find the MSE, take the observed value, subtract the predicted value, and square
that difference. Repeat that for all observations.

KCG DEPARTMENT OF CSE 19


20
KCG DEPARTMENT OF CSE 20
Gradient Decent Method

Gradient:
• A gradient is nothing but a derivative that defines the effects on
outputs of the function with a little bit of variation in inputs.
• Gradient Descent (GD) is a widely used optimization algorithm in
machine learning and deep learning that minimises the cost function
of a neural network model during training.
• It works by iteratively adjusting the weights or parameters of the
model in the direction of the negative gradient of the cost function
until the minimum of the cost function is reached.

21
KCG DEPARTMENT OF CSE 21
22
KCG DEPARTMENT OF CSE 22
23
KCG DEPARTMENT OF CSE 23
24
KCG DEPARTMENT OF CSE 24
25
KCG DEPARTMENT OF CSE 25
26
KCG DEPARTMENT OF CSE 26
27
KCG DEPARTMENT OF CSE 27
28
KCG DEPARTMENT OF CSE 28
29
KCG DEPARTMENT OF CSE 29
30
KCG DEPARTMENT OF CSE 30
Steps in Gradient Decent:

31
KCG DEPARTMENT OF CSE 31
32
KCG DEPARTMENT OF CSE 32
Learning Rate

33
KCG DEPARTMENT OF CSE 33
34
KCG DEPARTMENT OF CSE 34

You might also like