0% found this document useful (0 votes)
27 views11 pages

Week 6

DATA SCIENCE

Uploaded by

Subham Patel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views11 pages

Week 6

DATA SCIENCE

Uploaded by

Subham Patel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Graded

This document has questions.


Question-1
Statement
Assume that for a certain linear regression problem involving 4 features, the following weight
vectors produce an equal amount of mean square error:

= [2, 2, 3, 1]

= [1, 1, 3, 1]

= [3, 2, 4, 1]

= [1, 2, 1, 1]

Which of the weight vector is likely to be chosen by ridge regression?

Options
(a)

(b)

(c)

(d)

Answer
(d)

Solution
Total error = MSE +

If MSE for all the given weights is same, the weight vector whose squared length is the least will be
chosen by Ridge Regression.
Question-2
Statement
Assuming that in the constrained version of ridge regression optimization problem, following are
the weight vectors to be considered, along with the mean squared error (MSE) produced by each:

= [2, 2, 3, 1], MSE = 3

= [1, 1, 3, 1], MSE = 5

= [3, 2, 4, 1], MSE = 8

= [1, 2, 1, 1], MSE = 9

If the value of is 13, which of the following weight vectors will be selected as the final weight
vector by ridge regression?

Note: is as per lectures. That is,

Options
(a)

(b)

(c)

(d)

Answer
(b)

Solution
We need to minimize MSE such that

for and .

However, the MSE for is lesser than .

Hence, will be chosen.


Question-3
Statement
Consider the following piece-wise function as shown in the image:

How many sub-gradients are possible at points , , and ?

Options
(a)

(b)

(c)
(d)

Answer
(c)

Solution
lies on the part of the function which is differentiable. For a differentiable function (subpart),
only one sub-gradient is possible which is the gradient itself.

lies at the intersection of two and . The function is not differentiable at this point (as left
slope is different from right slope). Hence there are multiple sub-gradients possible at .

lies on the part of the function which is differentiable. For a differentiable function (subpart),
only one sub-gradient is possible which is the gradient itself.

lies at the intersection of two and . The function is not differentiable at this point (as
left slope is different from right slope). Hence there are multiple sub-gradients possible at
Question-4
Statement
For a data set with 1000 data points and 50 features, 10-fold cross-validation will perform
validation of how many models?

Options
(a)

10

(b)

50

(c)

1000

(d)

500

Answer
(a)

Solution
In 10-fold cross validation, the data will be divided into 10 parts. In each of ten iterations, a model
will be built using nine of these parts and the remaining part will be used for validation. Hence, in
total, ten models will be validated.
Question-5
Statement
For a data set with 1000 data points and 50 features, assume that you keep 80% of the data for
training and remaining 20% of the data for validation during k-fold cross-validation. How many
models will be validated during cross-validation?

Options
(a)

80

(b)

20

(c)

(d)

Answer
(c)

Solution
If 20% of the data is used for validation, that means, 1/5th part is used for validation, which
means, 5-fold cross validation is being performed. In each iteration, one model will be validated.
Hence, total 5 models will be validated.
Question-6
Statement
For a data set with 1000 data points and 50 features, how many models will be trained during
Leave-One-Out cross-validation?

Options
(a)

1000

(b)

50

(c)

5000

(d)

20

Answer
(a)

Solution
In leave one out cross-validation, only one data point is used for validation in each iteration, and
the remaining n-1 data points are used for training. Hence a total of n = 1000 models will be
trained.
Question-7
Statement
The mean squared error of will be small if

Options
(a)

The eigenvalues of are small.

(b)

The eigenvalues of are large.

(c)

The eigenvalues of are large.

(d)

The eigenvalues of are small.

Answer
(c), (d)

Solution
Mean Squared error of . Trace of a matrix = sum of eigenvalues.

If the eigenvalues of are large, the eigenvalues of will be small. Hence, trace will
be small and in turn MSE will be small.
Question-8
Statement
The eigenvalues of a matrix are 2, 5 and 1. What will be the eigenvalues of the matrix

Options
(a)

4, 25, 1

(b)

2, 5, 1

(c)

0.5, 0.2, 1

(d)

0.6, 0.9, 0.1

Answer
(c)

Solution
If the eigenvalues of A are a, b and c, then the eigenvalues of will be 1/a, 1/b and 1/c.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy