Professional Documents
Culture Documents
Wa0012
Wa0012
makes the Lode Shorter and
\lectorization :- aN eae
=>
| : w + boarameters- | Makes
| w tw, ws 3) b (ie ne
b ws a numbet + porameten | Gru
tis behivad
) [x x. %3] ee
> We vean vechrize the UF b x :-
( =
| We np array ((1.0, 2 5,73 33)
v v
: aes ied ta wed
xX = Np. array (C10, 20, 301) }
| a np- dot (wx) +b
Nectorized
Implementaho n) a a using tor Joop
er fz0 ie
ea eae Use Ae paral) s
n ane for coarctation heen ee caat
f= f+ wl * xq)
f= f4b
Gsiadiend Descent ie
We So Crees toe) toi Cignosu'
> 2
mS sel yc: ries
Derivatives
W = Np. array (Co-$,2-3,--- 3-4)
d = Np array (fo-3, 0.2,... 0.4)y Mee mee ey A
= —> Te
we W- Od
: r
> wb We pricceed Without vectouizathon - ‘
we wil have +o write update a
Stogement even cstime for each bowametest. ‘
"
ier On tel ay 4
l2= We- Ot
Ww w. a, 4
\ %
1
Chae Wig = Wig - Orddic 1
ei use a for oop +0 update eark puameterq
Tod im vange Cig) + 9
WCj2= wljj-o1% dCj3 1
{
* with veclorization -
'
Xo, we stan Bimply implement. 4b an
us - ted
Syntax:
Np. Zeros Cah
ye. ALgbe 1 Ode).
an intAhape 3 ts an unt or tuple of int
(For(nx)') Cfor nxm )
type > optional barameter with debate va ay
fiat. 9 inb float ete
DideH > Debines whethest fi) Store Munrdimensiona|
(rut) way ™ Tow major (c- Uyr) or
©
Creates a 1x3
| aa
import pumpy as np:
sce = Np. Zeros Cone
Braye it = Np.zero (3)
import sacked as Np \
ay
creates o
Ax3
eer
Np: tavclow . Handom — Sample Cn, m))
‘Ni — ary ae ‘
Fe Murnipte Lrear, Reqression’ ¥
Re en GNF ag
Previous Notation \leclor Notation
Farametens Westies! Me, 3b Wiss ps a. Wa
G vector of renath n
b Us Ati a umber
Model Sj PR) Ware wate
Cost den. Rpts) Uo see Wu" S)
epear £ repeat
“Giradient Descent) a = 5 ABS H way = Usp UB seg
bs b- 03 ain) OF
Cs
G Hadient Descent 4 — .
En SORAED Nise Zeseeeei
eee n featutes Cn 22)
repeat § Bideent = $
wee wah = (Fuel (xc) mA ES Oe kOe
t=1 1 yg). = yo?) _
u—~_~—___ mn
2 Ti a= aL & (Fp (rey :
b= bat = (ap ey |? was
re cu :
Pe ei Sak) «
STmuttanco us! Ca vess ae
Update wr, b oe
3 Simultaneous update ‘
rc
Bactoryg= 1 2 --0) and |features and barameten Veuues
prea Wat ee ee ®
Size No: oy
Bedrooms
XH: Rize Cheer?) ; € : 300 40 2000
X, dokos J, (
Pine
Cony ae Li: # Bedrooms
poise pets on oor
Xo oa
let thon be one Seung example an fovrowy -
Howe - x,= 2000, %, 25, pouce = $ Sc0k
We san chooze she
Poametens Wooo wo
W='50, Wis 001
2 2b=50 | Wi = Ost paWaelse), bao
og \ ¢
Jane Ama \ Amaw
\
ange
mel A
price = Som Rove k +O esx ! Price = Ot # Zoek 4b HS 4 So
+sok | ~
a \ 200k 250k Sok
pre 2} toe, 050, son. A
Cless teosonabie , P** * $seox free Fecuon
Prediction) !
predichiou )ail Tn a ee
=. Seatune pize b posoneloe pize 3-
| Mze oh Features Size of
Eo
Yize ein feet? at ele
# bedrooms +>
features
At Ledvoomp lees
(™)
ize in
ia
=—s vadient Nescout will +axe a lor of
( wstime to reach she optimal Vatua.
Wy
Tescaled
Ln w
Size in ‘
feat rescaled
rescatedDOPOD REREEEESESEEETISEIIITEE IED
‘
Seature kc Ahh :
se Bedyoom x x; € 300 £%X%, | 2000
¥ Lee
1, Scaled 2668
Se i ; 3 wh
tee So es Soe
Ol ce, ape” Size Fiiscalel aay
>ize in seer ye Seas 3 ei aoa
xX
EB a —=5 5 Xa, en.
ee Oe = > | a1 Scaled aah
coe FB sealed G ons 2% act
% aa 3 ° < x, Scoted <4
Seok
MEAN NoaMAUSATION + -
X, (mean) => by, = “See 200e Hees.
ArCmean) > My sSase.
2 ume fay Sy. ae
ay gmax) = 1) Cmin) Sead
Se
1, (aud) = =the .
4, (mar) — Ym)WU; = Goo Gy) and Syblays 2 -3
a -\ 300 - Goo
- 018
Zooe - Jeooe
\4e0 (Foo
=> A (Scores) a\- 018 < Alsearad ) H9.82
~0.46 = Ua(seatad ) = O-54
Z-Score Nosmatization +. -
pte mene sigan ty
Pe denote 6 to 0, +450
Mak Ty G,=1.4
wb = 600
Rea %.3
ome ee OSS SARA RAAXNore a feature Searing , aim for alcout
dened ee Yeacale
— © +00) = trys oe! > too aman > opal.
Checking Gradient Descent. 3-
—> While Rawni Gradient Descent, ocd piel
Know ushether U Gk Sa Suna or Net.
Wie, Gh elgale
ee ae
Bo ee ceamete
b= } on b)bbjechve : ae ~% URE Bethe se. ccs: b)
* Yo make pure
Wak itn Descent ff
wd bb) aly}
Wwe can pled $s 4
vp te aS =
maa “esa
Gradient
=> Twp ° Ngee ot terahow 0
a Ayte A he Gave.
= TU, b) phowd decrease et “OG
Shenasious + 7
> Se, learning Cunte can be wed te ped Gp
cin vot.4\ who matic Com a ence ‘Vest a
Salas oe be lon
“4 (Bb) Xe decreases
% QO Value \ess than or equat sto €
sin Gne SYercchon 5 declane la
(
Crees APPROPRIATE teaguing Reve te
> Tdentily Problemp with = GD io
ASH
ae
“4 a Le ee \ike above unth
iteration, be te iberatious “0
| SNete v= With a sman he Votue Te
; ates nite, oh x, a)
ould Cech anes ion 2 F
Wepotiouw »
1 there mie bY g Wg.
a - eee” wT - wrrrvrree,YyY Y
Th re dow nt
Oo ate. ONO Sag OOM Or \ > 4
— xo
Upe one % , ana plot
dw jus iteradion aud
Oe
TW LY VE + teat
chack ip
vy UAFVVPVVUPPPTPTTT TTPO 8
Dur aim Aheuid, be +e Sina out largom posibie
Saw rate, +o make Go fasten’.
Mm Revue state
G hea iM
q
3s ent > Neus Acarune Yee
oS
Fwy Rye Way + ways Oe es,
Jeorune g Merri => ae
a iq ee dearunes />
drouafer mit or Combine
Coa “ee.
Felynomia Regression. .-
wauition te dos ig
Ls + Pougnomiar Regression 4s a neu ade
Mh Combining Murtibie dinear Regression
ee Seatune & Ree sae,
wot Nets (Ua) Hy Nenneat Cuteem do he.
data,
size: x=
oT = We + WS 4 bk
Kize Aze™
Howewrex 4 we sry to te
this cue to UK data ,—. 2
iy UsAN rental — Atant Gs dousn
Q
eer
ve = ~
Ve x *
eas
ur aa
Makes no Reuse toy the brize
of the house do 2 er
Mereany Aize.. |
s
bo, mabe wt ab bethen to Fir a cubic
Curve,
ee Wye + Wa? + wy? aos
Se ee
hize Mize? Aize3
Aize 443y
Note s- TE we create featusen , that ane
< these powers , shen Jeatune toed
become, even More -+mportant .
For ' ak 2% ranges between 0 to 10>
: 6
shen Dae csr =n betwen Oto 10
oer Apeciat attentio® to featuste Siem F
We med also use
Use saa Seehie-a~ Goat aS owe
aisen data.Week 3: Gassih cation tie,
Motive ww 4- NR east Regression LE notge
ese onan tov Cleuwsifi ceabiow frobiem-
Ls hogishe ‘Regression.
;
it. Cawification +. -
Gueshen Arn pvoere
> Is the email Abam? GMO RNa
> le tran partion
: treauwent © Yes oR No
> Is the tumor
maiatene Hotes Sa Re:
eae one of bie Vewes
Cis poe Cleas ication.
+ Claes =
z Cos “a ¢
Petre true
a ed emeg Used Sov
\ \ Caidication -
ue ave
ClosNeve We may ane to fa ai JS ihendt
or ebay model to out
sings dota ap bejouy :-
DoT Oey ns B
Cree
Bi)
CNo) 6
4 Sumor he >
Howeved, Gt win botechiet a confudous
So, ushedll Ure. Teon. . ds
for This
Mocie\
—> Let
ao ot.
Notue 7) Stathers than O claw.
ws chesnre aq vy
Nouwts Ob a 4hreshold een eS)
Uy fee) ad Ss > 4-0
A
Swe (43 z=oa.s Ss L
eae
Hes
training data, the Winean R
Aeamp to be Worl