wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

ML-overall

Total questions: 25

Worksheet time: 1hrs 5mins

Name
Class
Date
1.

Which of the following is a widely used and effective machine learning algorithm based on the idea of bagging?

a)

Decision Tree

b)

Regression

c)

Classification

d)

Random Forest

2.

To find the minimum or the maximum of a function, we set the gradient to zero because:

a)

The value of the gradient at extrema of a function is always zero

b)

Depends on the type of problem

c)

Both A and B

d)

None of the above

3.

The most widely used metrics and tools to assess a classification model are:

a)

Confusion matrix

b)

Cost-sensitive accuracy

c)

Area under the ROC curve

d)

All of the above

4.

Which of the following is a good test dataset characteristic?

a)

Large enough to yield meaningful results

b)

Is representative of the dataset as a whole

c)

Both A and B

d)

None of the above

5.

Which of the following is a disadvantage of decision trees?

a)

Factor analysis

b)

Decision trees are robust to outliers

c)

Decision trees are prone to be overfit

d)

None of the above

6.

How do you handle missing or corrupted data in a dataset?

a)

Drop missing rows or columns

b)

Replace missing values with mean/median/mode

c)

Assign a unique category to missing values

d)

All of the above

7.

What is the purpose of performing cross-validation?

a)

To assess the predictive performance of the models

b)

To judge how the trained model performs outside the sample on test data

c)

Both A and B

8.

Why is second order differencing in time series needed?

a)

To remove stationarity

b)

find the maxima or minima at the local point

c)

Both A and B

d)

None of the above

9.

When performing regression or classification, which of the following is the correct way to preprocess the data?

a)

Normalize the data → PCA → training

b)

PCA → normalize PCA output → training

c)

Normalize the data → PCA → normalize PCA output → training

d)

None of the above

10.

Which of the folllowing is an example of feature extraction?

a)

Constructing bag of words vector from an email

b)

Applying PCA projects to a large high-dimensional data

c)

Removing stopwords in a sentence

d)

All of the above

11.

What is pca.components_ in Sklearn?

a)

Set of all eigen vectors for the projection space

b)

Matrix of principal components

c)

Result of the multiplication matrix

d)

None of the above options

12.

Which of the following is true about Naive Bayes ?

a)

Assumes that all the features in a dataset are equally important

b)

Assumes that all the features in a dataset are independent

c)

Both A and B

d)

None of the above options

13.

Which of the following statements about regularization is not correct?

a)

Using too large a value of lambda can cause your hypothesis to underfit the data.

b)

Using too large a value of lambda can cause your hypothesis to overfit the data.

c)

Using a very large value of lambda cannot hurt the performance of your hypothesis.

d)

None of the above

14.

How can you prevent a clustering algorithm from getting stuck in bad local optima?

a)

Set the same seed value for each run

b)

Use multiple random initializations

c)

Both A and B

d)

None of the above

15.

Which of the following techniques can be used for normalization in text mining?

a)

Stemming

b)

Lemmatization

c)

Stop Word Removal

d)

Both A and B

16.

In which of the following cases will K-means clustering fail to give good results? 1) Data points with outliers 2) Data points with different densities 3) Data points with nonconvex shapes

a)

1 and 2

b)

2 and 3

c)

1, 2, and 3

d)

1 and 3

17.

Which of the following is a reasonable way to select the number of principal components "k"?

a)

Choose k to be the smallest value so that at least 99% of the varinace is retained.

b)

Choose k to be 99% of m (k = 0.99*m, rounded to the nearest integer).

c)

Choose k to be the largest value so that 99% of the variance is retained.

d)

Use the elbow method

18.

You run gradient descent for 15 iterations with a=0.3 and compute J(theta) after each iteration. You find that the value of J(Theta) decreases quickly and then levels off. Based on this, which of the following conclusions seems most plausible?

a)

Rather than using the current value of a, use a larger value of a (say a=1.0)

b)

Rather than using the current value of a, use a smaller value of a (say a=0.1)

c)

a=0.3 is an effective choice of learning rate

d)

None of the above

19.

What is a sentence parser typically used for?

a)

It is used to parse sentences to check if they are utf-8 compliant.

b)

It is used to parse sentences to derive their most likely syntax tree structures.

c)

It is used to parse sentences to assign POS tags to all tokens.

d)

It is used to check if sentences can be parsed into meaningful tokens.

20.

Suppose you have trained a logistic regression classifier and it outputs a new example x with a prediction ho(x) = 0.2. This means

a)

Our estimate for P(y=1 | x)

b)

Our estimate for P(y=0 | x)

c)

Our estimate for P(y=1 | x)

d)

Our estimate for P(y=0 | x)

21.

Question 21-24: Consider the following figure for answering the next few questions. In the figure, X1 and X2 are the two features and the data point is represented by dots (-1 is negative class and +1 is a positive class). And you first split the data based on feature X1(say splitting point is x11) which is shown in the figure using vertical line. Every value less than x11 will be predicted as positive class and greater than x will be predicted as negative class.


Question 21: How many data points are misclassified in above image?

a)

1

b)

2

c)

3

d)

4

22.

Question 21-24: Consider the following figure for answering the next few questions. In the figure, X1 and X2 are the two features and the data point is represented by dots (-1 is negative class and +1 is a positive class). And you first split the data based on feature X1(say splitting point is x11) which is shown in the figure using vertical line. Every value less than x11 will be predicted as positive class and greater than x will be predicted as negative class.


Question 22:

a)

Greater than x11

b)

Less than x11

c)

Equal to x11

d)

None of above

23.

Question 21-24: Consider the following figure for answering the next few questions. In the figure, X1 and X2 are the two features and the data point is represented by dots (-1 is negative class and +1 is a positive class). And you first split the data based on feature X1(say splitting point is x11) which is shown in the figure using vertical line. Every value less than x11 will be predicted as positive class and greater than x will be predicted as negative class.


Question 23:If you consider only feature X2 for splitting. Can you now perfectly separate the positive class from negative class for any one split on X2?

a)

Yes

b)

No

24.

Question 21-24: Consider the following figure for answering the next few questions. In the figure, X1 and X2 are the two features and the data point is represented by dots (-1 is negative class and +1 is a positive class). And you first split the data based on feature X1(say splitting point is x11) which is shown in the figure using vertical line. Every value less than x11 will be predicted as positive class and greater than x will be predicted as negative class.


Question 24:Now consider only one splitting on both (one on X1 and one on X2) feature. You can split both features at any point. Would you be able to classify all data points correctly?

a)

True

b)

False

25.

Suppose you are building random forest model, which split a node on the attribute, that has highest information gain. In the below image, select the attribute which has the highest information gain?

a)

Outlook

b)

Humidity

c)

Windy

d)

Temperature