Docsity

machine learning appunti e diritto, Sintesi del corso di Machine learning

Toggle sidebar
bg1
1
MACHINE LEARNING IN MANAGEMENT (MLM)
a.y. 2025-2026
Prof. Pierangelo Ciurlia
Written exam (Facsimile)
December 15, 2025
Exercise 1 (5 points). Given the observations
(𝑥#,𝑦#)
(
0,1
)
))))))))))
(
2,4
)
))))))))))
(
3,6
)
))))))))))
(
5,7
)
consider the models given by
𝑓1(𝑋)=𝑋+1
and
𝑓5(𝑋) =2𝑋
. Check whether
𝑓1
has a smallest
training error than
𝑓5
.
Exercise 2 (5 points). For a response
𝑌
and two predictors
𝑋1
and
𝑋5
, the following model is
estimated
𝑌=0.02+0.4𝑋1+3𝑋5+0.7𝑋1𝑋5
Supposed that
𝑋1
is a dummy variable (taking values in
{0,1}
), calculate the change of
𝑌
when
𝑋1
takes values
0
and
1
, while
𝑋5
is held fixed.
Exercise 3 (5 points). Consider the following observations related to the variables
(𝑋1,𝑋5,𝑌)
⎝
⎜
⎜
⎛
𝑋1𝑋5𝑌
𝐺𝑟𝑒𝑒𝑛 1 2
𝑊ℎ𝑖𝑡𝑒 0 1
𝐺𝑟𝑒𝑒𝑛 2 3
𝑊ℎ𝑖𝑡𝑒 3 4
𝑊ℎ𝑖𝑡𝑒 5 7
⎠
⎟
⎟
⎞
Predict the response
𝑌
when
(𝑋1=𝑊ℎ𝑖𝑡𝑒,𝑋5= 4.4)
by KNN regression with
𝐾=1
or
𝐾=2
,
respectively.
Exercise 4 (5 points). Explain the difference between
𝐿1
norm and
𝐿5
norm of a vector and calculate
these values for the vector
𝐱=(0,2,−4)
.
Exercise 5 (5 points). Given the observations
𝐱L=
(
2,0
)
))))))))))))))𝐱M=
(
3,4
)
))))))))))))))𝐱N=
(
1,5
)
transform them via z-score scaling.
pf2

Anteprima parziale del testo

Scarica machine learning appunti e diritto e più Sintesi del corso in PDF di Machine learning solo su Docsity!

1

MACHINE LEARNING IN MANAGEMENT (MLM)

a.y. 202 5 - 2026

Prof. Pierangelo Ciurlia

Written exam ( Facsimile )

December 15 , 202 5

Exercise 1 (5 points). Given the observations (𝑥

consider the models given by 𝑓 1

(𝑋) = 𝑋 + 1 and 𝑓

5

(𝑋) = 2 𝑋. Check whether 𝑓

1

has a smallest

training error than 𝑓

5

Exercise 2 (5 points). For a response 𝑌 and two predictors 𝑋

1

and 𝑋

5

, the following model is

estimated

1

5

1

5

Supposed that 𝑋 1

is a dummy variable ( taking values in { 0 , 1 }), c alculate the change of 𝑌 when 𝑋

1

takes values 0 and 1 , while 𝑋 5

is held fixed.

Exercise 3 (5 points). Consider the following observations related to the variables (𝑋 1

5

1

5

Predict the response 𝑌 when (𝑋 1

5

= 4. 4 ) by KNN regression with 𝐾 = 1 or 𝐾 = 2 ,

respectively.

Exercise 4 (5 points). Explain the difference between 𝐿

1

norm and 𝐿

5

norm of a vector and calculate

these values for the vector 𝐱 = ( 0 , 2 , − 4 ).

Exercise 5 (5 points). Given the observations

L

M

N

transform them via z-score scaling.

2

Exercise 6 (5 points). To evaluate the quality of the service, we collect the following data about

customers of our pizzerias: 𝑋 1

= walking distance from the closest parking place ( in Km ); 𝑋

5

= food

quality ( from 1 to 10 ); 𝑋

O

= gender (female = 1 , male = 0 ) , 𝑌 = is the customer satisfied? ( Yes /

No ). We estimate a logistic model to predict 𝑌 according to 𝑋 1

5

O

and we obtain the following

estimated parameters

V

W

1

W

5

W

O

W

a. Write the estimated model.

b. Calculate the probability that a male customer is satisfied when he has parked 0. 6 from the

restaurant and has given a score equal to 8 to the food quality.