Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

STATS303 Midterm Exam

Problem 1. (60pt)

Assume you are the principal data scientist of a company named Dorakitty. A manager from another division needs some help from you and asks you the following questions. Answer his / her questions in plain language.

1.  (20pt) Our division have some sales data and we trained a linear regression model with 100 independent variables. But we don’t believe we need to interpret our sales using so many variables. What should we do?

2.  (20pt) Our sales data can be partitioned into several clusters and we plan to use K-means for this task. However, we don’t know exactly how many clusters we have. What should we do? Give me one idea.

3.  (20pt) Our division fit a Nadaraya-Watson kernel weighted average for our sales data.  However, at boundary there seems to be a big bias. What should we do?




Problem 2. (50pt)

Assume a regression model r = f (x) + c where x, r e R, f (x) is some deterministic but unknown function and c ~ N(0, σ2 ). Suppose g(x|θ) is our estimator to f where θ denotes the parameters.

1.  (20pt) Write the density p(r|x) in terms of g(x|θ) and σ .

2.  (10pt) Suppose there is an unknown joint density p(x, r) for x and r.  Explain why the log likelihood c(θ|x ) of p(x, r), where the sample x = {x, r} contains i.i.d. data points, can be written as

c(θ|x ) = log     p(r|x) + C .

≠=1

3.  (20pt) According to Parts 1 and 2, show that the maximum likelihood estimator is given by minimizing

≠=1


 


Problem 3. (50pt)

Consider the data points ℃ 1 = (0, 1, 2)T , ℃2 = (-1, 3, 4)T , ℃3 = (0, 0, 1)T and ℃4 = (2, 3, -2)T .

1.  (10pt) Write a data matrix ← for the data points where each row correspond to a data point.

2.  (10pt) What is the first step if we want to apply PCA to the data points? Choose from the following.

(A) Center the data around the origin;

(B) Perform SVD on ←;

(C) Perform K-means on ←;

(D) Perform dimensionality reduction on ← .

3.  (10pt) Suppose a system gives output rj if we input ℃j for j = 1, 2, 3, 4. We fit a ridge regression model by solving

min  1 冂(冂)- - ˜ x 冂(冂)2 + λ |x|2  ,                                              (4)

where - = [r1 , r2 , r3 , r4]T . What is ←˜?

4.  (20pt) By taking the gradient with respect to x, derive the solution of (4) in terms of  , λ and -.


 


Problem 4. (40pt)

1.  (20pt) Let {x} be given. The K-NN density estimator is given by pˆ(x) =  where dK (x) is the distance between x and its K-th closest neighbor in {x≠}. Prove that pˆis NOT a density.

2.  (20pt) Consider applying K-means with K = 2 clusters to the five points (0, 0), (1, 2), (2, 0), (3, 2), (4, 0). Suppose the initial centers are set to be (0, 0) and (3, 0). Write the E-step and the M-step for the first  iteration. You need to clearly state the locations of the centers and the labels of the points.