wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Machine Learning and Neural Networks Worksheet

Total questions: 100

Worksheet time: 50mins

Name
Class
Date
1.

Learning from incomplete or partially observable data is referred to as:

a)

Weak supervision

b)

Clustering

c)

Overfitting

d)

Semi-supervised learning

2.

Which of the following is a boolean classification algorithm?

a)

Decision Tree

b)

k-Means

c)

Apriori

d)

PCA

3.

In a binary classification task, assuming equal prior probabilities for classes is what kind of bias?

a)

Symmetric bias

b)

Prior bias

c)

Feature bias

d)

Distribution bias

4.

What does np.savetxt('file.txt', arr, delimiter=',') do?

a)

CSV-style save

b)

Tab-separated save

c)

Save as JSON

d)

Binary save

5.

Which metric is most likely used in Maximum Likelihood estimation?

a)

Distance

b)

Probability

c)

Entropy

d)

Accuracy

6.

The output layer of a classification neural network uses:

a)

ReLU

b)

Tanh

c)

Softmax

d)

Mean Pool

7.

For a coin flipped 20 times with 14 heads, what is the MLE of P(H)?

a)

0.7

b)

0.6

c)

0.5

d)

0.65

8.

A perceptron with inputs [1, 1] and weights [0.6, 0.6] has threshold 1.2. Output = ?

a)

1

b)

0

c)

Cannot determine

d)

-1

9.

In a version space, what does the G boundary mean?

a)

Generalized dataset

b)

Most general hypothesis

c)

Best performing model

d)

Most specific output

10.

Which of the following prevents internal covariate shift in deep networks?

a)

Pooling

b)

Batch normalization

c)

ReLU

d)

Gradient descent

11.

Which strategy helps avoid premature convergence?

a)

No crossover

b)

High mutation

c)

Elitism

d)

Small population

12.

You have 16 hypotheses, each classifying 20 instances. After 5 examples, 4 hypotheses remain. How many hypotheses?

a)

12

b)

4

c)

8

d)

10

13.

Which method stacks columns into rows?

a)

melt()

b)

pivot()

c)

groupby()

d)

explode()

14.

Which of the following is a greedy algorithm used for decision tree construction?

a)

KNN

b)

ID3

c)

PCA

d)

SVM

15.

Which of the following best represents inductive bias?

a)

Data collection process

b)

Preference for certain hypotheses

c)

Noise in input

d)

Lack of features

16.

Result of np.argmax(np.array([1,3,2,5,4])) is:

a)

3

b)

4

c)

1

d)

2

17.

A two-layer MLP with 3 neurons each layer has how many weight connections (excluding bias)?

a)

9

b)

6

c)

12

d)

18

18.

In RBF networks, the activation of a unit is highest when:

a)

Far from center

b)

Close to center

c)

At any input

d)

Zero weights

19.

A dataset has 60 positive and 40 negative examples. What is the entropy?

a)

0.971

b)

1

c)

0.881

d)

0.5

20.

If model has 10 parameters and log-likelihood is -300, what is MDL (approx)?

a)

620

b)

610

c)

590

d)

600

21.

A model has log-likelihood -100 and 5 parameters. What is AIC?

a)

210

b)

205

c)

200

d)

195

22.

Given a consistent learner, what is the max number of mistakes with 128 hypotheses?

a)

128

b)

64

c)

7

d)

8

23.

What is candidate elimination used for?

a)

Reducing training time

b)

Learning weights

c)

Finding all consistent hypotheses

d)

Cleaning the dataset

24.

In genetic algorithms, a chromosome represents:

a)

A DNA string

b)

A solution

c)

An attribute

d)

A population

25.

Naïve Bayes fails when:

a)

Features are correlated

b)

Data is small

c)

Priors are unknown

d)

Too many classes

26.

Which parameter in concat() can ignore duplicate indices?

a)

ignore_index=True

b)

drop_index=True

c)

axis=1

d)

index=False

27.

A case receives 4.2 adaptation score from expert A, and 3.8 from expert B. Compute average.

a)

3.9

b)

4

c)

4.1

d)

4

28.

Which search strategy is commonly used in concept learning?

a)

Breadth First

b)

Depth First

c)

Beam Search

d)

Candidate Elimination

29.

What happens during mutation in GA?

a)

Swap chromosome

b)

Reverse optimization

c)

Small change in solution

d)

Delete worst solutions

30.

Which method merges on index instead of columns?

a)

join()

b)

merge()

c)

concat()

d)

groupby()

31.

Which metric would be most appropriate for binary attributes?

a)

Cosine similarity

b)

Euclidean

c)

Hamming distance

d)

Mahalanobis

32.

What is concept learning concerned with?

a)

Learning constraints

b)

Identifying features

c)

Learning a Boolean function

d)

Sorting algorithms

33.

Compute Manhattan distance between (1,2,3) and (4,0,6).

a)

6

b)

8

c)

10

d)

12

34.

What is a major disadvantage of LWR?

a)

No categorical data

b)

High training time

c)

High prediction cost

d)

Ignores prior knowledge

35.

Probability of x under θ=0.4 is 0.2, under θ=0.6 is 0.4. Which θ is chosen in M-step?

a)

0.4

b)

0.6

c)

Both

d)

Cannot decide

36.

Why might LWR fail in high dimensions?

a)

Curse of dimensionality

b)

No closed-form

c)

Inflexible kernel

d)

Poor residuals

37.

In a binary classification, P(C1)=0.6, P(C2)=0.4, P(x|C1)=0.3, P(x|C2)=0.5.

a)

0.31

b)

0.56

c)

0.69

d)

0.45

38.

A perceptron misclassifies input [1,0] with weight [0.5,0.3]. Update weights for class=1 with lr=0.2.

a)

[0.7, 0.3]

b)

[0.5, 0.5]

c)

[0.6, 0.4]

d)

[0.3, 0.3]

39.

Which algorithm finds the smallest consistent hypothesis first?

a)

Find-S

b)

Candidate-Elimination

c)

ID3

d)

Backpropagation

40.

A dataset has 1000 samples. For LWR with local linear regression, how many models are trained to predict 10 new points?

a)

1

b)

10

c)

1000

d)

10000

41.

Hidden layer neuron receives inputs [2, 1] with weights [0.3, 0.4]. What is the linear combination output?

a)

1

b)

0.7

c)

1.4

d)

1.1

42.

Which is a benefit of genetic algorithms?

a)

Always converges

b)

Handles non-linear spaces

c)

Requires labeled data

d)

Needs large datasets

43.

What happens if all initial weights are zero and inputs are [0,0]?

a)

Always zero

b)

Can’t train

c)

Output = 1

44.

Which layer in neural networks receives raw input?

a)

Hidden layer

b)

Output layer

c)

Input layer

d)

ReLU layer

45.

Why is Candidate Elimination considered a deterministic learner?

a)

It uses rules

b)

It memorizes data

c)

It eliminates hypotheses

d)

It relies on entropy

46.

A perceptron receives weight vector [1, 1], input [1, 1], and threshold 2.0. Output = ?

a)

1

b)

0

c)

-1

d)

Cannot determine

47.

df['new'] = df['x'] * 2 performs what kind of operation?

a)

Vectorized

b)

Scalar

c)

Loop-based

d)

Recursive

48.

A learner trained on dogs classifies horses as dogs. What does this indicate about its inductive bias?

a)

Overfitting bias

b)

Generalization failure

c)

Negative transfer bias

d)

Representation mismatch

49.

Which attribute returns the number of elements in an ndarray?

a)

.size

b)

.shape

c)

.dtype

d)

.ndim

50.

BOC is most useful when...

a)

Low variance

b)

Noisy labels

c)

Single hypothesis

d)

High bias

51.

Which metric is not commonly used in decision trees?

a)

Gini Index

b)

Information Gain

c)

Entropy

d)

RMSE

52.

If a = np.array([[1,2],[3,4]]), what is a[1,1]?

a)

2

b)

3

c)

4

d)

1

53.

Given df1 with index A, B and df2 with index B, C — df1.add(df2, fill_value=0) will result in:

a)

Index A, B

b)

Index A, B, C

c)

Only C

d)

Index B, C

54.

What does the following return: np.array([1,2,3]) * 2?

a)

[2 4 6]

b)

[1 2 3 2 3]

c)

[1,4,9]

d)

Error

55.

What does the MDL (Minimum Description Length) principle prefer?

a)

Complex models

b)

Shorter encoded models

c)

Deeper trees

d)

Fewer samples

56.

Which strategy does Find-S algorithm follow?

a)

Most specific hypothesis

b)

Most general hypothesis

c)

Random selection

d)

Max likelihood

57.

A learner rejects complex hypotheses regardless of fit. What is this preference called?

a)

Structural bias

b)

Hypothesis-limiting bias

c)

Simplicity bias

d)

Accuracy bias

58.

How many samples are needed to guarantee with 95% confidence an error less than 0.1 from hypothesis class of size 10?

a)

299

b)

230

c)

240

d)

100

59.

Given a hypothesis space H with 128 hypotheses, how many binary classification functions are learnable without inductive bias?

a)

128

b)

21282^128

c)

log2(128)

d)

0

60.

Pruning in decision trees is used to:

a)

Increase tree depth

b)

Improve accuracy

c)

Prevent overfitting

d)

Enhance entropy

61.

When G has multiple general hypotheses and S has a narrow specific one, what does this indicate?

a)

Overfitting

b)

Bias

c)

Uncertainty

d)

Clarity

62.

What does np.arange(2,10,2) return?

a)

[2,4,6,8]

b)

[2,3,4,5,6,7,8,9]

c)

[2,6,10]

d)

[3,5,7,9]

63.

Gibbs Algorithm randomly selects hypothesis using...

a)

Training error

b)

Posterior distribution

c)

Likelihood

d)

Margin

64.

In Mahalanobis distance, what happens if features are highly correlated?

a)

Distance increases

b)

Distance becomes Euclidean

c)

Distance becomes small

d)

Distance ignores correlation

65.

If log-likelihood = -250 and 8 parameters, what is AIC?

a)

516

b)

500

c)

520

d)

508

66.

A binary classifier predicts correctly 90 out of 120 samples. What is its accuracy?

a)

0.6

b)

0.9

c)

0.75

d)

0.8

67.

Which of these is true for BBN inference?

a)

Exact in polynomial time

b)

Always approximated

c)

NP-hard

d)

Logarithmic

68.

Which step of EM estimates parameters?

a)

A) Expectation

b)

B) Maximization

c)

C) Both

d)

D) Neither

69.

Which kernel function results in the highest weight for closer points?

a)

Gaussian

b)

Uniform

c)

Linear

d)

Triangular

70.

Which operation keeps all keys from both DataFrames?

a)

Outer Join

b)

Inner Join

c)

Left join

d)

Right join

71.

In real-world problems, model performance is mostly evaluated using:

a)

Training error

b)

Confusion matrix

c)

Generalization error

d)

Time complexity

72.

BBNs are used for:

a)

Classification only

b)

Causal inference

c)

Clustering

d)

Regression

73.

For a dataset with high-dimensional features, which distance measure degrades?

a)

Euclidean

b)

Manhattan

c)

Cosine

d)

Jaccard

74.

Compute the Euclidean distance between points (1,2) and (4,6).

a)

3

b)

5

c)

V18

d)

V20

75.

A softmax output layer is most suitable for which type of task?

a)

Regression

b)

Binary classification

c)

Multi-class classification

d)

Clustering

76.

MLE for normal distribution uses which estimator for mean?

a)

Mode

b)

Sample mean

c)

Variance

d)

Median

77.

If BOC chooses class with probability 0.7, what is the uncertainty?

a)

0.3

b)

0.7

c)

0.49

d)

0.21

78.

Given 3 hypotheses with accuracies [0.7, 0.6, 0.9], and uniform priors, which dominates BOC?

a)

h1

b)

h3

c)

h2

d)

None

79.

For a binary classification, 5 neighbors vote [3:Class 1, 2:Class 2], but Class 2 has higher average proximity. What's the label in weighted voting?

a)

Class 1

b)

Class 2

c)

Cannot say

d)

Depends on data size

80.

The S boundary in candidate elimination represents:

a)

Most specific hypothesis

b)

Most general hypothesis

c)

Training data

d)

Prediction error

81.

Infinite hypothesis space leads to:

a)

Higher sample complexity

b)

Faster convergence

c)

Fewer updates

d)

Regularization

82.

What is the purpose of a learning rate in backpropagation?

a)

Control overfitting

b)

Scale weight

c)

Remove noise

d)

Increase depth

83.

Which strategy is used to prefer one hypothesis over another in concept learning?

a)

Gradient descent

b)

Backpropagation

c)

Inductive bias

d)

Entropy minimization

84.

What is fitness landscape in GA context?

a)

Algorithm

b)

Error surface

c)

Evaluation graph

d)

Search space contour

85.

Hypothesis H1 has 0.7 accuracy on D1 (size=20) and H2 has 0.9 on D2 (size=10). Which has better likelihood?

a)

H1

b)

H2

c)

Equal

d)

Cannot determine

86.

Which function is used to save a NumPy array as text?

a)

np.savetxt()

b)

np.save()

c)

np.dump()

d)

np.write()

87.

Which of these is most likely to cause overfitting in a neural network?

a)

Too little training

b)

Large dataset

c)

Too many parameter

d)

Shallow architecture

88.

Overfitting occurs when:

a)

Model is too simple

b)

Model is too noisy

c)

Noisy data

d)

Features are correlated

89.

In coin toss, with 3 H, 2 T, what is MLE for p, (prob of H)?

a)

0.6

b)

0.5

c)

0.7

d)

0.4

90.

Given priors P(h1)=0.3, P(h2)=0.7 and P(x|h1)=0.2, P(x|h2)=0.5, compute P(x)

a)

0.41

b)

0.5

c)

0.29

d)

0.37

91.

A neuron receives error δ=0.2 and input x=0.5. What is the weight update using learning rate

a)

0.01

b)

0.005

c)

0.02

d)

0.015

92.

Given a np.array([[1,2],[3,4]]), what is np.sum(a, axis=1)?

a)

[3 7]

b)

[4 6]

c)

[1 3]

d)

[2 4]

93.

For input [2, 2] and weights [0.5, -0.5], what is the net sum?

a)

0

b)

2

c)

-2

d)

1

94.

In a 3-attribute Boolean space, if S = (Sunny,?,?), G = (?, ?,?), what type of boundaries do S and G form?

a)

S ⊆ G

b)

G ⊆ S

c)

S ∩ G = ∅

d)

S = G

95.

Total error is calculated using:

a)

Mean error

b)

Mean squared error

c)

Absolute error

d)

Maximum error

96.

What is the type of the object returned by np.array([1,2,3]) > 1?

a)

ndarray of bool

b)

list

c)

int

d)

float

97.

What is returned by np.array([[1,2,3,4,5]])[[0,2,4]]?

a)

[1 3 5]

b)

[0 2 4]

c)

[1 2 3]

d)

[2 4 5]

98.

What is the output of a sigmoid function always between?

a)

-1 to 1

b)

0 to 1

c)

-∞ to +∞

d)

0 to 10

99.

What improves LWR prediction without increasing computational cost?

a)

Increase data size

b)

Regularization

c)

Use distance

d)

Fit neural net

100.

You flip a biased coin 10 times: 7 heads. What's the MLE of P(heads)?

a)

0.7

b)

0.5

c)

0.3

d)

0.6