().
de linea,91addiint (2: loat,4i oat tataVeshno
SS
IDsUp-023
Lists Tuples.
isto ae mutable Teples au mmutaslo
mere
upls conumes
ist cone Lit
Companed to Hhe
6, 1,8, 4]
: 0 , , 3, 4, 5,-y-3 -2 -J
2 3
i) pi:[-5:] [7, e, ]
) þ2 -4,&, 1, 6, 5,1, 3, 1, o]
CePA- Qnd-semeer]
Sen
DoWhatFioats Yourbang
in [5,63:
eetun
[1,2]:
etun hounth"
tores the
4.2) a). aloe- count. mont Cemnen ()
sÉnilan (eommon ohjeut and aange
Output
2
araen
blue
matplotib -yiot au plt
impsnt Height)
pLt Scaten(9 utoigt, xip(iskel, eeiglt, etght):
lakcl, wt, t
annotate (label
pt g- ut,ht),
ygtent:(5, -5),
ie ntcosrds ttaet point
Redaron betuan bolgut anel eigl
pe. ttie C"
plt wlabe("uelghut")
")
ptt ho)
plt
mpont matplotlb yplat
tzt
total-eot
L muwMat (vonioce))
iakol 'vawiarte '
vaniarta, 'g-', 2''
pt (s,
plet '-, lokcl-'bias
bias-touaned,
plt-plot( ,
tomptita)
pt xlalael (" Medl
loc=4)
Bias- Vaniance Trade o
pt. tlte ("Jhe
p2t-ahoo( .
yeetet
f Vectort
$3) a). det shstraet
8)
tiping import Lit
feom
Vector- LitToat
w: Vector)Vetor
dol Sebstra t (v: Vecto,
len (1) = lon(w)
sent
retuen i - w-i V, L
Jubstract (v,w))
ce eislane (v:VNectoe : Vectoa) ector
tort- man (v? Ve cto)- Netorr
o
vecor-sum(ve ctors))
rceto to
tte code,
but matmatial
Cbmyonent
Rlnd eut -the
calculatin
1] V8 L2, 2,4,6J
V2 I3,4, b,
V LI,3,2,4]
L,3, 4,&]
vy atbt4t4
3+4+a+3 4 J
t+2+3t|
V=
L , 8 , 4,5J vetort
mean
cpmpuutaton o the
wa, -a, I, aJ .
Det product and
(ttead the
anoid making mitakis
like me).
4+72t
1,aJ
3,4,5] L- 2, -2,
[a,
461 + 52
+
akl-) + 3*(-2)
15, 5D, 69J. # t no.
y) a). Dataset: [9a,95, 85, 80
mear:
(ai -7) :
42-99-) =|4 29 Q04041
a98- 9 441
q5-79.?1= 1429
= 53 1441.
t344 1
Ht: 844 1
64-774|= - lo|. 114.o4 1
15661328 (suw)
Vanlane Cal latien?
2
(2-) |566-1328
d 1 0221 guanantu
mai ali
de sakti
tandand doviaton:
8 J6)-0221 = l6. 56 1
tpng inport Beat :
trom 3Uatch. lenean.
Pmport mash.
vaniante (as: Litl jesat] )> jeat:
deviatfanz demean (os)
sanones( dovaton) o-1
dot stondod - doniaion (os: Lit L{eat])eat:
otondard -dey?atarn(a)
otdery olardard-devlatin (y)
70
P(A) : 1
a)
9)
P(B):1/2
P(A]B) P(A) indirsndent
P(B)
P[B) -
P(ElA)- PCA) 1
pdy(*:hoat) jioat
uni<orn - elee
eten 1.
ele
0.0
ivese. nenal- cd (p'oal,
afeeat.1,
toleane: heoat 0.0000 1) +jaat :
cgmat! 1:
etur mu t
tolonance toleranu)
wwhile
mid-p: nrmal-cdt (Mid -z)
6) a). Joo euento E and f ane lnderindsnt te
9 one euent dassn't oanend n te
and thu hobabitty at bohy ropporn a& tbe
ttat eact Bne haens
heads rekabiliy
about E abot Faens
the head then
ahe nat tail
Tend
(6)
1 k Aandom.handbm () <p ela
elae
binuial (n: tht , p:4eal ) intnt
- rangelo))
paramelers ae (PR)
o(1-o )
4.583
Voctor
olope, inomtont tahet a
pedido: olopo t htmnpt
guaned
onltne. M
Malntain
tsoining tample
0- 00 1
(soo)
vochor msan (I lnea,- gadint .toeta) jor
thet a goadiert-ctep ( theta,
puint (efoch, tucta) .
do oler( f: (alabla (INector ]. joarJ,
v: Vectoi, R: nt kifcoat)oat i
Athunn ( A(w) - ("))/h.
AS)2). IDSUp
b)) uith openl nhone.tt') as t:
Je. mate ("(ola)?[6-9J0 -9)54t')
) Demited les ae eithen comna- erarted
lino has eneral ields
tab- nanatad peahlns
a tab indiating whene
wt
endo and the n t
rfle
6.5
1
y.g
q:5
imFort
Otuento: owTs]
ackage tudento aag)
89) 4) -NN 1000
0
aloout
D aa moclel has bias hen a d mare
a weeel hao higl vniance, -then
thin Yemee
N (Fp)
,(in)
Atoay: tpttn
tptfp+ fn1to .
() ouealM=tp
(P+)
False me ans we redicted Cancen but
false negatie Mans t uas edited not cance bet
ueas Caner
False oiline = lo
= 5.
faloe
aiD) a). p: 5,a).
P - t(A7-5)
pl- to-
p2-p:1-5)-+ (2-4g
6.403
5V2 e t04|
t(2-.S35125:J50 52
ps-pNo0-5) 2/2 e a·828
y4 8
t (5-)
3
bmallst istane oich ü
Frd the,
Pl-P p4-P p-p
boleng to CC1.