0% found this document useful (0 votes)
24 views

Linear Regression Machine Learning Model

1. Linear regression is a simple supervised learning technique used to model the relationship between variables and predict outcomes. 2. It finds the best fit straight line through the data points by minimizing residuals or errors between the actual and predicted values. 3. The slope and intercept of the line are used to make predictions by plugging in new x-values to the linear equation y = mx + b.

Uploaded by

Lokesh Sharma
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views

Linear Regression Machine Learning Model

1. Linear regression is a simple supervised learning technique used to model the relationship between variables and predict outcomes. 2. It finds the best fit straight line through the data points by minimizing residuals or errors between the actual and predicted values. 3. The slope and intercept of the line are used to make predictions by plugging in new x-values to the linear equation y = mx + b.

Uploaded by

Lokesh Sharma
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

feature. nce.

erperi pofot Pt
bet be
dffference
Of
Qnd
actual
brw
the
preducted line
4akes
QS
y-
Y- I9rerept.
QxiS
nodei)
dependen
take ffnd
the Straght
pofot the
weigbtWhich the
which baued erence
(Superviged 3Point
the
prfce. preducted of Y: ot
+B1
Bo
ore
prite diff equation
metingmovement
knon
preduct mode saary dataue,
training
the
: 98
EDUA
mode (oe
ft
Best ) totercupt
'poin
AAua hoCx
nd wetght ’ ’experienre
that
REGRESSIN Kesidua is untt
featue
nd precictpreduct rror
actual
pofo SIoPe
pofnt
X=0
Crear
hegst ’ the
wben
One
Rndependent
LiNEAR e SUh that )hat
witb
auInput mPopmum
in betwen 1ntercept:
)
Tercept
SiMpLE Baed
) elope
)
líne
Gf
)
Sundaram
order best need -0

change and

Chorgg the Vaue of Oo,O


bet |ine

funcHon

mintmikng errors residuals wng egaafon.

Resdu lerrors

COSt funaton MERH


9OUARE
ERROR

prec°cteq Actua
Ie need minimize +he CoSt funcHon
bet ft Ifne
qer

Sundaram FOR EDUCATIONAL USE


Tranin9 datae

2.

3 3

Iwhen

| Co-s)t (-2 + (rs-3)

Bet fit Ifne

ho (x) 0t 0rC3) - 1S

JCO)

’ Gradient desnt crve

mnimun eror at this point


Or Gobay mfoima

Sundaram FOR EDUCATIONAL USE


need Te0U global minima
hange there
SOme mechanism cau ed Converqence aqosithm
that optimixe the rawe.
Ghange
CONYERGEN CE AIGORITHM

Repea the
Slope
converqence
decidu
earmfng
+he Convergence Speed

rate

5-ve) (slops) tangent Slope (trej


deoreorg
-ve 8|ope

tve
S\ope

<- rearnfnq rafe

q is ery +Pme to

globou
1f iS very larqe Jump bere
there wont
qlobal miotma.
Sundaram) be FORaroun
EDUCAO-001
USE
fos Smar
Gep9.
MulTIPe LINEAR REGRESSIO
VariabËe and One
moo
indeperdunt
dependunt Variable.

XI X2
Sixe or príce

size of Toom
Try to ffnd bet fit plane

Slope Or oeffiiet
tnjerrept

pofre
O2)
Gradient descen Curve

GlobaJ mfoimo
potYN6 MI9L REGReSSloN
Non- iner TelaHONsbip -beroeen independunt and
dependnt Varioble
(fnear reraton

Non-foear rHoship
Polynornia deqree
Sundara) FOR EDUCATIONAL USE
MuTIpLE PorYNOMI9L REGeESS |OH
feature One depencunt
featue
) Assumpton
Linear
relationsbip
istribted
normauy
mutt aollinearity

X2

POlynomiy deqree
.".

PERFORMANCe MeTRICS SeD LINeAR REGRESSION


COn hek model is good Or not wfnq
perfoomane metn
R-SQUARED
Meayure the per formance of the model

(eest ft (foe)
-- -- CAvg of Y)
R-Suared S9 peS
X TOtCU

SReS Surn of 8quare @esd ua Cyi-yi)


9STotaSwn of Square averaqe Cyi-yY)2
R-squared = | - 2 Cyi-yi low \ralwe

Vau e
Sundaram) FOR EDUCATIONAL USE
î9
which
eraute
featue
add
price
P4 pice.
Gender
accureuy ber
num P=2 P=3
not
the
Podupendan
Locarion
datapojnt
CI-R2)CN-1)
dhe with
cmetri FOR
EDUCA
USE
wheh the
Correlated 63. 86.
Pnerea
ng: 13.
pnereaufng Cye
Of of
but
Number
umbe
Pocreauing
feature
higbly houe
added
feature
SQUARED
fnereau
y
featue 16aHOO
R-SquQre Gendu djusted
p
trdependent R2 model
R- Size
Of
boue iS
Ike
ep P
Adjuted
ADJ Example:
USTED feature
-pendent
not the
88Y.
goy.
6S
Sundaram
TYPES of COST FuCTIO

MSE C mean 9quare error)

yiActual yi ’ predicted

Advantaqe: thig equaton differentable.


aUS hay gtobal ofnfma.
pisad vantaq: > Not robw+ oulierg
nOt Same wn
RS CiNR)

’ Conver ferctfon
MSE ha ConveX funcfon

Gtobou mPoma
Otierg

yu to t er bet ft 1fne
get
ghifted "

E9: Experiece ’ independunt feaure


Gaary ’ dependnt featre
(y-* (lakhs
j u n i t oharqinq’ tfme conplexty
lale dont do scauing for dependun tt featue

Sundaran FOR EDUCATIONAL USE


TYPES Op COST FurCTIor

MSE Cmean 9quare error )

n
h (yi-yy
yi Actual yi precicted

Advantaqe: his differeNtable.


aU S hay One gtoba ofnpma.
pisad van taq: robwt to 0tier
not Same
eg:

’ Conrer furcfon
MSe Convex funion

Giobau moina
Ouerg

yu to Ot er bet f t 1ne
ghifted "
get

Experience ’fndepenunt feature


dependnt feature
(y-) (lakhs y2. unit ehaneinq - tfme complejty
dont do for dependnt feature

Sundaram) FOR EDUCATIONALUSE


CMean Absolute error )
MAE

4dvantage: robwt to
Sme sit
pisadvtaq: } Convergence +akes Hne
nptex
3) RMSE CROOt Meon Sguared Error )

RMSe = MSE

Adyataqe :) {t diffeen tiab|e


semaio
Tisad vantage: > Not sobwE to

Sundaram FOR EDUCATIONAL USE

You might also like