Scarica Exam questions Optimization for machine learning e più Prove d'esame in PDF di Machine learning solo su Docsity!
Quiz OML
ANTONINO
GANCITANO
GIUSTA QUIZ FEBBRAIO^2021 /2 (^) APPELLO) (^) SBAGLIATA
- In^ order^ to^ evaluate^ the^ performance of^ a^ regression model (^) , we (^) compute the blas and the (^) variance of^ the prediction error^.^ We^ obtain^ that^ the^ variance^ is^ high and^ the
bas low. This
probrably means that o the^ model^ is^ une onwenense the^ complexyour molea The model^ isove onwenerose^ the^ complexyofour mole a
- Consider^ the^ data^ matrix^ A^ =^ [2]
Which of the
following represents the^ optimal solution^ of^ the^ approximation (^) problem ** = (^) argminx IIA-XI12 S (^). t (^). : (^) ramk(x) -11? a x*[3], b) x
= (^) v
- *2] , c)^ **^ =[i],^ a)^ ** [8]
- Given^ the^ dataset^ X^ = [1.^2 ,^33 suppose^ we^ apply the^ bootstrap procedure on^ this^ set.^ Then^ :
- The^ probability of^ extracting the^ set^ X=^ [1.^1.^13 via (^) bootstrap is smaller^ than the (^) probability of extracting X" = (^51). (^2) , 33
- The^ probability of^ extracting the^ set^ X^ =^ [1 , 1 , 13 via^ bootstrap is^0.^0711
- the^ probability that^ a^ bootstrapped set^ X'^ doesn't^ contain^ the^ element^ "1"^ Is^0.^0370
- The^ probability of^ extracting the^ set^ X=^ [1.^1.^13 via^ bootstrap is^ equal than the (^) probability of extracting X" = (^51). (^2) , 33
- A linear^ SVM^ for^ binary classification (^) is trained (^) by solving am optimization problem of^ the^ form minwo, wellWIl^ + cmax(1-yi(w +^ wo)^ ,^ 0] Where^ yi-1,^13 denotes^ the^ class^ labla Suppose we^ solved^ this^ problem , and^ we obtain^ the^ following optimal SVM model parameters Wo,^ W^ :^ No^ =^5 , wi^ = [- 2 , (^) 3]. Consider the new (^) input data (^) point x( = [-] , X= [1] (^). Then :
a minwll^ (4-51) -^ (x^ -^ *^ 1T)" wIl +^ 111w-wIl, where =^ 1Y, ^ = 1 ,=
- (^) minwll (4-51)-(x- E (^) 15)"wIl +^ Allw1l1^ , where= (^) Ay (^) , E = Axv
- (^) minwll (4-51)- (x- E^ 15)"wIl +^ Allw/l1^ , where= (^14) , = (^) = x1 (? (^) )
- (^) minwll(4-51)- (x- (^) E1T)" WIl^ +^ 111w-wIl (^) , where =Y^ ,=^1 ,
- Consider a Gaussian mixture distribution withc (^) components (^) , where the first (^) component is a Gaussian distribution (^) N/M (^) , E1) with mean (^) M1 and^ co-variance^ E1^ , and^ the second^ is^ N(M2, E2)^.
The
mixing probabilities^ of these (^) two Gaussian (^) components are denoted (^) by M (^) , itz (^). Given (^) am observed (^) point X (^) , what is the probability that^ such^ X^ was^ generated by the^ first^ component distribution?^ For^ your answer, assume the (^) following numerical data (^) : (^) Me =^ [11]" (^) , M2 =^ [-1-2]T (^) ,^ El^ =^ Ez = I^ where I^ denotes the identity matrix^ ,^ and^ let^ #^ =^0.^3 ,^2 =^0.^7 ,^ X^ =^ [00] T (^9 0). 87056)0. 6576c)0. (^) 3121d) 0. 3 13)consider thelasso^ problem minxern (^) EllAx-yll +^ Al^ all^ , where, 0 , A (^) c Rm (^) , yeR (^) ore given ,
X ER"^ is the decision variable. As discussed in the^ practice on
coordinate (^) descent methods for the (^) LASSO , there exist a value such that the (^) optimal solution*^ (2) of the^ above (^) problem is Identically zero^ for^ all^ values^ of^ a^ larger than^ I.^ Such^ value^ is given by^ : a= maxi (aiTy) (^) , where (^) ait (^) , i = (^1) , ..., m (^) are the (^) rows of^ A (^?^ )
- E^ =^ 11 AT^ yll
- = maxi (9iTy) (^) , where^ ait^ , i^ =^1 ,..., m^ are the^ columns^ of^ A d) E^ =^11 A
yllz
& Questions 1 , A , 10 ore the same of^ those^ ones below
(Re-used)
· Valori singolari di^ A^ :^ radici^ degli autovalori^ di^ (ATA)
= Gree
A =^2 [12]-05] = [5]
detrata^ =^0 :^ (a+)(e^ -a)^ =^0
21 =^1 , 22 =^1 , 01 =^2 , 62 = 1
AUTOVALORI VALORI (^) SINGOLARI VETTORI SINGOLARI DI V^ :^ ATA · (^) Autovettore (11 = (^) 1) : (ATA-11) = 0 + (^) 18-3)5 = 0 -
· (^) Autorettore (22 = (^) 1) : (ATA - 1) 2 = 0 + (^) 188) = 0 + (0 (^) , 1) (^) - D
- V = [i] ↓ GIANORMALIZZATI En^ E
VETTORI SINGOLARI Di U^ : An disti
=-(0)=^ Ei)^ = (^) L U · = (i) = L =>
= 2. (10) = (^) c (^) (E] = [8) :[i]
- (^) Rango =^ ordine^ della^ sottomatrice^ pui (^) grande (d (^) quella considerata) che ha det (^) + o
- Matrix^ E containings^ data^ points^ of^ dimension^2 :^ X^ =^2 = (^) 25] 1 x^2
. 2x3 =^ 1x Give that (^) the first (^) principal direction of (^) the (^) sample co-voriance matrix of this data (^) is un = (0. 3101 0. 9103)T, (^) corresponding to the (^) eigenvalue & = (^5). 2701 which of (^) the (^) Following represents the deflated (^) sample co-variance matrix (^) , once the first^ principal component has been removed? (^0). 0559 -^0. 0202
- (^) s .[16)SISS ,^ S = (^70). 020200073) , d)s = (^) [0% (^550000) & ! VARIANZA COVARIANZA &= (^) = 0 , y = 0 = (^) [S = [5Ses] x=xy^ =^ ((2) + (0)(-^ +^ (i(3) (^) = · (^) Adesso, alla matrice di (^) covarianza (^) campionaria dobbiamo sottrarre la (^) componente (^) principale : 11 USUIT com UUT^ = [03101](0.^ 30109103)^ =J
com za vint^
=[ (^7) ) · Edeflazionato = (^) E-11MUnt = [35] -
· Distribuzione mista
gaussiana con due (^) componenti
(^) ercomponente (^) N(M1 , En) , (^) un =^ [11]^ ,^ En^ =^2 =^ I
(^) zu (^) componente N(M , Ec)^ , Mz =^ [-^1 :^ -^ 2] a 1 = (^0). (^3) , 2 = (^0). (^7) , x = (^) 2010) =D (^) P(X
generated by the^ ercomp^.^ )^ =^ M. N(x(m, (1) i 1. N(x(m1, (1) + πc - N(x(Mz , Ez)
· densità probabilità distribuzione normale multivariata
N(x(mn (^) , Er) (^) = et
- MelT(x - mi) = (^) Fel-2) =^0.^05855 com (x- mi)
(n)]"[(8) - (n)) =^ (^ -1^ -^ 1) (^ =^ 2) =^1 +^1 =^2 N(x(m (^) , Ez) (^) = el^ -2 - 5) = (^0). 013067 com(x - ma)T(x -^ Mz)^ = [(8) - ( = (^) 2)]T((8) - ( =^ 2)] =^ (12)(2) =^1 +^1 =^5 = (^) P =^59 - 6. (^740). 013067
= 0.^6576
↑ *^ Plpositive)^ =^ P(p(1)^.^ P(1)^ +^ P(pInI.)-^ p(ul)^ (Law^ of^ total^ probability) sensitivity :^ TPR^ = TEN ↑^ (^ positive(Immune) =^1 (sensitivity)^ => P(positive) = 1 * 0. 10 + (^0). 05/0. 90 = (^0). 115 ↑ (^) (positive ( not (^1) .) = 0. (^05) (1-specificity)
- (^) specificity : TNR (^) =IN P /not I (^). ) = (^0). 90 , PCI) = 1-0. 90 = (^0). 10 TN + FP P (not I
. /positive) : PICOCITiveno)
· PInotIllBAYESTHEREM) - P(not(p
= (^090) = 03103 = (^3) %
P+ (illness) =^ 20/100^ =^0. 2 , P-^ (No^ illness)^ =^801100 =^0.^8 -^ >^ Hy = - (0. 2 leg, 0. 2 + 0. 9100. 8) =^ +^0.^7219
· TOTAL CONDITIONAL ENTROPY H(y (F) = p(f= 1) H(y(f =^ 1) + p(f= 0)H(y(f= 0) : 0. 951A +A
- 1)^ P(illness^ (f=^ 1)^ =^ 15/10^. 4 (Noillness (f^ =^ 1)^ =^ 25/40^ -^ >^ H(y (f^ =^ 1)^ =^0.^ %^.^ 51A^ ↓
- P(illness^ (f= 0) =^ 5/60^ , P(No^ illness^ (f= 0 =^ 55/60^ +^ H(y(f^ =^0 =^0.^1138 H(y(f)^ =^ (^0). 63005 =>(G(y(f)^ =^ H(4)^ -^ H(y(f)^ =^0.^09185 N-(TRAINING
· 1 =^ x
- 1)- 70. 5 = c - (^21) ++ - (^0). 25 = 4 - (^) c + (^0). 750 · (^) LARGEST (^) ElGENVALLE (^) (X = (^1). (^) 5) - > (^) ELENVECTOR : (^) /S - 1. (^5) 1) v = 0 [ ↑(2) : [ ]( * 7 =^0 -
- (^0). 501 - (^0). (^50) :-
- (^) = (^) v1 = - 12 = v = (^) (- (^1) , 1) -sormacitandov = [
2n +^ 1(^? )
~