wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

ML QUIZ1

Total questions: 25

Worksheet time: 18mins

Name
Class
Date
1.

In a linear regression problem, h(x) is the predicted value of the target variable, y is the actual value of the target variable, m is the number of training examples. What do we try to minimize?

a)

(h(x) – y) / m

b)

(h(x) – y)2 / 2*m

c)

(h(x) – y) / 2*m

d)

(y – h(x))

2.

Can a cancer detection problem be solved by logistic regression?

a)
Yes, logistic regression can be used to solve a cancer detection problem.
b)
Cancer detection requires complex neural networks, not logistic regression.
c)
Logistic regression can only be used for binary classification problems unrelated to health.
d)
No, logistic regression is not suitable for cancer detection.
3.

In a logistic regression problem, what is a possible output for a new instance?

a)
A continuous value greater than 1
b)
A binary value of 0 or 1
c)
A categorical label such as 'yes' or 'no'
d)
A probability value between 0 and 1
4.

Let g be the sigmoid function. Let a = 0. What is the value of g(a)?

a)
-1
b)
1
c)
0.5
d)
0
5.

What is the Manhattan distance between a data point (9, 7) and a new query instance (3, 4)?

a)
9
b)
5
c)
12
d)
8
6.

Which of the following statements is not true about the Decision tree?

a)

It starts with a tree with a single leaf and assign this leaf a label according to a majority vote among all labels over the training set

b)

It performs a series of iterations and on each iteration, it examine the effect of splitting a single leaf

c)

It defines some gain mea sure that quantifies the improvement due to the split

d)

Among all possible splits, it either choose the one that minimizes the gain and perform it, or choose not to split the leaf at all

7.

Which of the following statements is not true about Information Gain?

a)

It is a gain measure that is used in the ID3 algorithms

b)

It is the difference between the entropy of the label before and after the split

c)

It is based on the decrease in entropy after a data-set is split on an attribute

d)

Constructing a decision tree is all about finding attribute that returns the lowest information gain

8.

Given the entropy for a split, Esplit = 0.39 and the entropy before the split, Ebefore = 1. What is the Information Gain for the split?

a)
0.75
b)
1.0
c)
0.61
d)
0.39
9.

Given entropy of parent = 1, weights averages = (3/4,1/4) and entropy of children = (0.9, 0). What is the information gain?

a)
0.1
b)
0.5
c)
0.325
d)
0.75
10.

K-Nearest Neighbors (KNN) is classified as what type of machine learning algorithm?

a)

Instance-based learning

b)

Parametric learning

c)

Model-based learning

d)
Unsupervised learning
11.

Which of the following is not a supervised learning

a)

PCA

b)

NAIVE-BYES

c)

DECISION TREE

d)

LINEAR REGRESSION

12.

The F1-score is the harmonic mean of which two classification metrics?

a)
Precision and Recall
b)
Precision and Specificity
c)
Accuracy and Specificity
d)
Recall and F1-score
13.

What is the range of the R-squared value in regression analysis?

a)

-1 to 1

b)

- infinity to 1

c)
0 to 1
d)

-1 to infinity

14.

Which regression metric is most suitable when dealing with outliers in data?

a)
Mean Squared Error (MSE)
b)
Mean Absolute Error (MAE)
c)
R-squared (Coefficient of Determination)
d)
Root Mean Squared Error (RMSE)
15.

Why is log loss (logarithmic loss) preferred in probabilistic classification models?

a)
Log loss is preferred because it ignores the probabilities and focuses on binary outcomes.
b)
Log loss is preferred because it only considers the final classification outcome.
c)
Log loss is preferred as it simplifies the model training process.
d)
Log loss is preferred because it effectively measures the accuracy of predicted probabilities and penalizes confident but incorrect predictions.
16.

In regression models, what does a negative R-squared(coefficient of determination) indicate?

a)
A negative R-squared indicates a poor model fit, worse than using the mean of the dependent variable.
b)
A negative R-squared suggests the model is overfitting the data.
c)
A negative R-squared indicates a perfect model fit.
d)
A negative R-squared means the model is highly accurate.
17.

Precision is defined as:

a)
The ratio of false positives to the sum of false positives and true negatives.
b)
The total number of correct predictions divided by total predictions.
c)
The percentage of true positives among all predictions.
d)
The ratio of true positives to the sum of true positives and false positives.
18.

What is the assumptions of Naïve Bayesian classifier?

a)
The features are dependent on each other.
b)
The features are independent given the class label.
c)
The class label is irrelevant to the features.
d)
All features must be continuous variables.
19.

Which of the following best describes the Bias-Variance Trade-off?

a)

Increasing bias always reduces variance.

b)

A model with zero bias always has zero variance.

c)

As model complexity increases, bias decreases but variance increases.

d)

Bias and variance are independent of each other.

20.

In the context of Bias-Variance Trade-off, what happens when a model is too simple?

a)

low bias, high variance

b)

high bias, low variance

c)

high bias, high variance

d)

low bias, low variance

21.

What is the primary purpose of pruning in a decision tree?

a)
The primary purpose of pruning in a decision tree is to reduce overfitting.
b)

To ensure that the tree perfectly classifies the training data.

c)
To add more branches to the tree.
d)
To enhance the accuracy of predictions.
22.

What is the purpose of using a validation set in addition to training and test sets?

a)

To evaluate the final performance of the model.

b)

To fine-tune hyperparameters and prevent overfitting

c)

To fine-tune hyperparameters and prevent overfitting

d)

To make the training process faster.

23.

What is the main difference between pre-pruning and post-pruning?

a)

Pre-pruning is applied after the tree is fully grown, while post-pruning is applied before growing the tree.

b)

Pre-pruning stops tree growth early based on conditions, while post-pruning removes branches after the tree is fully grown.

c)

Pre-pruning is always more effective than post-pruning.

d)

Post-pruning does not affect overfitting.

24.

How does L2 regularization (Ridge Regression) affect the model?

a)

It shrinks some feature weights to exactly zero.

b)

It reduces large coefficient values without setting them to zero

c)

It increases model complexity by adding more features.

d)

It removes irrelevant features from the dataset.

25.

What happens when the regularization parameter (lambda) is set too high?

a)
The model will have increased complexity.
b)
The model may underfit the data.
c)
The model may perfectly fit the data.
d)
The model will ignore the training data.