Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
28 views5 pages

Linear Regression Short Note

The document discusses various aspects of machine learning, particularly focusing on supervised machine learning and linear regression techniques. It covers concepts such as error minimization, the ordinary least squares (OLS) method, bias-variance trade-off, and regularization techniques. Additionally, it includes mathematical formulas and algorithms relevant to linear regression and multiple linear regression models.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views5 pages

Linear Regression Short Note

The document discusses various aspects of machine learning, particularly focusing on supervised machine learning and linear regression techniques. It covers concepts such as error minimization, the ordinary least squares (OLS) method, bias-variance trade-off, and regularization techniques. Additionally, it includes mathematical formulas and algorithms relevant to linear regression and multiple linear regression models.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Reresim 1

ML- algetm redeted Une


Superisel ML Aetuat
Doaset Calalate fw.

b 7-mt
(-) -+tanget
Err(E) = e o r /Loss ’ minimle.
(-mni-b)..
Chonge in E fr
Chbmgt in b.

(G-mxi-b)'o<
Liuor
’(-m,-b)"=0
Dala
> ( - mx;-b). (-)=0
> y i - m -b o (+)
1020 b
-mi-b

be2j n= 4
2t2+242
b+bt.b
Y+Yt..-Yn
Dote -0 Pmely LinPrw Teal bfe x
Yeal bfe -v ’ y- m-be0
’ b= y-m7.
Best fit lineT Cest
depondntng)
(Pa)
Asume hafind
e m+b
M> slope ($-M-6)=0
be y- inteopt’ (wedtg).
(ofset
3
y* independent yaiable (up) (o
dapendent variable 2( - mNi-9 +m)(-+)=o
(p). (-)-m(ai-+Je(i-)
indepen dentE

(*;-)")= o
(6-P(;-4) - m
enpnne
m= (-9) (i-)

Pg m*enpeñena Jireet fomula


plg mo onpeHenezo/teskes b> 9-mt
m (y )(

feshos phgzo... t pssi ble


So b( offse eguied.
tmget’ fnd out onea prsHn n &b: Ihrodien egrasen he
direiien f stapest asun
finding
m&b
wos’
ensure w one at eeal
peixl
Cosed Jom seahon [Non- Clesat forn setaHio
Direl- fTmula Apperinnatm Bascd goromtead to be the
OLS technique (ordiney Last Spune) Gndtent Desunl minimoa.
iromnple Los Surfuu ’
= -bt20Vy-yo
Exat solulian
Sk lean ’ Liny Regresim Cm intemaly uue
SGD Resim Cam- OLS 4elhrigu.
lavealm
k-- Multpu La calulan,
Kresim Matias, Eor tn()’ "Smple
Meom Abseute EoY
E--$Y
sds Not dhible a o
ady: Outiey ftect not se muh
MAE unit = p cof unit
Mem SquL Fm
ATo8
(7-) T-8) (y-$) ---.. ao=
edu Difforentable at o.
outlier ofet
MSE wmit # op uumit
Reot Meom Squu F
VMSÉ
ae: Difenenhablu ot o
RMSE nit p mi
=(A 8)--- (aB)= 6TAT]
dss outber otteet -hy C
---- te= ATS]
R Sure
-meon

$Se
SSm
2(.m)( ,1)
’ best
’ bad w
predicE = J8-2aw+u)
nwost
Mem

+ ( w ) =0 (mabix).
’ 0- 2
i Lezenig
i =m+b

(w) (y («*a)")

i/p Seotne =m
XT= (mn)
(mt, n)(n,me)
(mal, m)
(e)-n, mi)
W

W3
(, ma >(met 1)
-(m+)
(a,? ( m) (n1,1).
O (oxn x(n+)) o()
e

Suppase e feature 999 total daa 1000


2 mputatim requinel l000 X1000 ^|000
’ 1000 o00000
Multpl LR
Gvodent Decunt ... wty?
maix multipleahon nsn ’ timu Cmpliy oa).
1 0rder optimvzohn clgoitbm
dApprah for y m+b)
D Select Tamdon bk m tal)
DAnd slope f b& m
D Update b R m m= m- nslope -±[(o-3)+ (6-)]
b b-. slope
When to stop
t0D0 time epochs.

|L (-) ±[-2(y-&)-2(4)T
=t[-z ()+(h-9)I
*2(i-mt; -b) (-) 2(-mni -b)(4) = # )+(3)]
=-2 (-m-b) e-2 2 (-m-)(0 -[(-)+ (%-) +(0-)+... (th-gn)]
/meom

clas CaDRegyzser:
det -init.. (selt, tearnin note, epohs): (-Bo-Aitn -bsn) -x)]
selk m=
self. b = = 2(-fo-B n B, Xn)(-i) t 2
self. lr= teorning.rot -t[-2(8-9,) (*) + 2(4-)()]
self. epochs epochs =t[-2 ((-9)(*1) + (h-&)(n)
for i in romge( selt. epochi):
tos-slope-b-2*np,Sum (g- selt m* Toel ()- self. b)
oss-slope-m -2*np-sum-sef.na XTovel()-celp rove) -5)(1) .
slt.be selt. b (ses tr* lors-slepe-)
Sut.m= suf. m-l slt.tr los-sope -m)
prinb( setm, self.b)
det prediet ( selk x):
| retum elf. m*sels b
a - -%2(-)(Win).
g4.itGoRgrz4or
(Xrom(o-0o,
-tran)so)
Shape
241 2X1
Sualer
3 4

231

form

Crrodlent Derunt - (-)()

(Spehaoth]
updete b1 update
n updte psih
thye Dat
tut cmmgene , - [9-8) .bain.
'boteh sloo Hug Dat
Shhosie fast
othma'se fot
Polynomiat RereuiY*onmtb stoeterug
L (*-94)"+ Am
Nulttpla LR
m Consttt bla
Cxpr porammil7
dgreer to d 3

T35 |oD|

deyru>2 |°xxx3 Y 20 be Censtt


Om
|o351215 o3s 2s 285|

2Àm = o
2 (i-mni-g+m)(-N+1)+
2- m-g4m) (-)+ 2m= 0
degreu= (*-3)- m (u-)
(ai-)] =o (bhside mlt pt )
X Am - 2
Am-*-)(i-*) - m
(1-7)"]=0
Am(-3) (*%-5) t m (*-)o
Amt m (u-) = (%5) (-)
Bias Vom)nee Trade -oft Li’ Simple LR
A=0 -.

1Bias mchngeb alio ehany


OHigh biau: Unable to tly copure the mlatnship in
hroin data
AD OLow bias : H the obility to tly Coyture thu yelahimhi w w+wt... w
in tran data
Vanionca (og + w)
I hgh Vorionle: Troinse yo
’Tutse Vor= Hihoz
[h-) ) -..
e n r 60 eTe +A wT
=(9-8)-) +AAw w
troin data +
otet dota -(8-$). (y-9)
Rejec) Bias Bias
Voriomu Variome4 Noniomue t R i u

eularizahm
A cmmque in ustch e odd smu enta tnfo
Se fhawe am eduu oreftng
T= Hmtity mahin
. Ridga Pyulmizohon 41) Seale value
ba
2. Lao
Rgulontotm ()
3.Elosie Net Regulitohton t )
Y= mn+b
oton dah
L3(-)* Aw
(8-8. (9-8) +
(-(w-1)) +ATw
* (-(w-)
*(-1( - ) (w) tAww
(uu)-y(rw-)+AwTw
=o+(s)" =(wNT-y)(w-4hwTw
-£(waw-
( - )(w)(u)
wywtyy)+ia wTw
4 [wxTx w- 2wy+Y]+wTw
Low en
FAS
m’)

L ($-m;-b)°+A m
L- C-)+A w

Shrtnk vae
W . Wn
w, W Wn 0
l(-5) (-1)- m(*-)°]+Ao

A=0 (ri-)"= (-)(-)-»


re feted more
(8-3) (*-*)-à
:(oet of )
A=o 516. 69 S242
owJump
Liw Troion
Bias voniome TTrolestt
Oveft Bias
L= (-ns-)-Ain odd 'u fr dltette help
( - m- 3+ m)- 2·m zo
Nee
Voiomu
=

L(-)+A w
m2
(9-5)(-) +A
(4-)

Pigde
L=(*-%)+Au MSE
oftuteh

OLs /Dlret formula sot

yreion cof. ofteuted bias


Bios Nojomee
mpo m

3 we
b-5- mz

mO
|La (8-9)* + alo+bo
4.tto
mo
(h-3)(-*)-> ()) mo
(9-)

neimesat O Malidonai pruent thun we Elnhenet


Li belngs
dunomnah.

You might also like