WorksheetsWorksheet MCQs extracted from provided images
Total questions: 125
Worksheet time: 1hrs 3mins
Which function best describes the size of the instance space with k attributes, each with n
k*n
nk
kn
log2(n)
Which method helps merge with fuzzy logic or approximate match?
merge_asof()
merge_fuzzy()
concat()
align()
If a DNN uses only linear activations in all layers, it is equivalent to:
SVM
One-layer network
Linear mapping
Nonlinear classifier
Merging two DataFrames on a common column uses which function?
merge
concat
append
join
Doubling the distance between input and center in a Gaussian RBF affects activation how?
Doubles
Unchanged
Decreases exponentially
Increases linearly
Which method assigns more weight to closer neighbors?
Decision Tree
Naïve Bayes
Locally Weighted
Bagging
Which method helps merge with fuzzy logic or approximate match?
merge_asof()
merge_fuzzy()
concat()
align()
Which of these techniques directly incorporates inductive bias?
Random initialization
Hypothesis pruning
Uniform sampling
High variance tuning
What happens if every new example contradicts existing S and G sets in Candidate Elimination?
Version space enlarges
Version space
G generalizes
S becomes G
What determines smoothness of the RBF decision boundary?
Distance function
Kernel width (σ)
Learning rate
Number of classes
In a dataset, a feature causes splits [10,10], [15,5]. What is the weighted Gini index?
0.5
0.48
0.45
0.52
Which of the following is a probabilistic model?
Naïve Bayes
Decision Tree
SVM
KNN
The decision boundary in KNN is:
Always linear
Always nonlinear
Can be complex
Always fixed
Layer outputs: [1.5, -0.5, 0.0], ReLU output = ?
[1.5, 0, 0]
[1.5, -0.5, 0.0]
[1.5, 0.5, 0]
[0, 0, 0]
The Bayes Optimal Classifier aims to:
Minimize computation
Maximize accuracy
Use all hypotheses
Reduce variance
Heuristic search is used in decision trees to:
Optimize depth
Select best attribute
Normalize output
Encode inputs
A ReLU activation function outputs what for an input of -2.5?
-2.5
0
2.5
1
Which of the following best describes G boundary behavior upon receiving a consistent input?
Becomes specific
Gets eliminated
Becomes more general
Refines by specialization
Radial Basis Function (RBF) is used in:
Decision Trees
SVM
Neural Networks
Case-Based Learning
Which of the following is not a metric distance function?
Manhattan
Cosine similarity
Euclidean
Mahalanobis
The learner’s task in a supervised learning setup is to:
Find the input space
Find the hypothesis
Design the test set
Create labels
For Naïve Bayes: P(Sunny)=0.6, P(Play=Yes|Sunny)=0.8. Compute joint.
0.48
0.36
0.72
0.64
Dataset = 1000 points, k=10, distance calculation is O(d). What is per-query complexity?
O(50000)
O(10000)
O(500)
O(10)
A perceptron can solve which type of problems?
Non-linear
Linear separable
All ML problems
Polynomial only
What is the primary goal of machine learning?
Predicting data
Extracting rules
Learning from data
Cleaning data
Which method stacks columns into rows?
melt()
pivot()
groupby()
explode()
If arr = np.array([[1,2],[3,4],[5,6]]), what is arr[:,0]?
[1 3 5]
[2 4 6]
[1 2 3]
Error
Which has higher expected accuracy: BOC or Gibbs?
Always Gibbs
Always BOC
Depends on prior
Equal
For 3 models: A(-120,4p), B(-100,6p), C(-110,5p), which has better AIC?
A
B
C
All same
Given x = np.array([[1,2],[3,4]]), what is x[0][1]?
2
1
3
Error
If mutation rate = 0.01, how many mutations occur in population of 100 genes?
1
10
100
0.1
Version spaces are updated when:
A new attribute is
A new instance is
Output is generated
Error occurs
An RBF network uses a Gaussian function with variance = 1. What is the output for input x = 1?
eλ−0.5
e−1
e−2
e0
In machine learning, the target function refers to:
Learned weights
Mapping being
Ground truth
Loss function
The output in KNN is predicted using:
Training loss
Aggregated neighbor
Distance matrix
Model weights
You observe data x=[2,2,1], with latent z having P(z=1)=0.7, compute E[z] over dataset.
2.1
1.5
2.8
3
A network with only linear activation functions is equivalent to:
Deep network
Single linear transformation
PCA
SVM
What is inductive learning?
Drawing specific
Drawing general
Drawing from noise
Drawing images from text
A test point’s 7 nearest neighbors have distances: [0.3, 0.5, 0.7, 1.0, 1.1, 1.3, 1.8] and labels A or B. Which class wins the vote?
A
B
Tie
Cannot be computed
Given a dataset of 10 i.i.d. samples with likelihood L=0.6, what is the log-likelihood?
-5.11
-6.4
-8.2
-10
A version space has 32 hypotheses. After seeing 2 consistent examples, only 8 remain. How many were eliminated?
8
16
24
28
Which layer reduces input dimensionality in CNN-based deep nets?
ReLU
Fully connected
Pooling
Batch norm
Backpropagation algorithm relies heavily on:
Chain Rule
Matrix inversion
Dropout
Normalization
np.savez('data.npz', x=[1,2], y=[3,4]) creates a file that stores:
Multiple arrays
Single array
Dictionary
JSON structure
In EM algorithm, if E-step results in expected value of latent variable Z = 0.7, and M-step is performed, what is updated?
Model parameters
Likelihood
Gradient
Prior
Hypothesis space search in GA involves:
Searching weights
Random walk
Chromosome evolution
Gradient updates
Forward pass through a network is used to:
Compute accuracy
Update weights
Generate predictions
Normalize data
Which aggregation function gives cumulative sum of a NumPy array?
np.cumsum()
np.sum()
np.accumulate()
np.add()
You run 10-fold cross-validation on a dataset of 900 points using KNN. How many samples are used for validation in each fold?
90
810
100
450
In noisy domains, which inductive bias is likely to generalize better?
Simplicity bias
Robustness bias
Overfitting bias
Exhaustive bias
Neural networks adjust weights based on:
Learning rule
Data similarity
Fixed values
Decision boundaries
What is the major drawback of Euclidean distance in high-dimensional spaces?
Too slow
Loses discriminativity
Works only with integers
Requires normalization
Which operation is NOT part of genetic algorithm?
Mutation
Crossover
Selection
Backpropagation
A small value of K in KNN may lead to:
Underfitting
High bias
Overfitting
High accuracy
In backpropagation, gradient is 0.3, learning rate is 0.2. Weight update = ?
-0.06
0.06
0.1
-0.1
Which factor is most critical in distinguishing supervised from unsupervised learning?
Number of features
Labeled data
Training speed
Number of iterations
Why is activation function necessary in multilayer perceptron?
For non-linearity
To speed training
Reduce weights
Make matrix invertible
Which method merges on index instead of columns?
join()
merge()
concat()
groupby()
Retention in CBR refers to:
Forgetting bad cases
Adding all failed cases
Storing new experience
Learning rate tuning
LWR belongs to which type of machine learning algorithm family?
Instance-based
Reinforcement
Bayesian
Generative
Given P(C)=0.5, P(x1|C)=0.8, P(x2|C)=0.7, compute P(x1,x2,C) for Naïve Bayes.
0.28
0.35
0.2
0.45
Given P(A)=0.4, P(B)=0.5, and P(B|A)=0.7, compute P(A*B).
0.35
0.28
0.2
0.25
In a dataset of 500 cases, 100 are invalid. How many valid cases are available for retrieval?
300
400
450
350
If all features are independent given class, then Naïve Bayes performs like:
Logistic Regression
Decision Tree
Gibbs
Bayes Optimal
If the output error δ=0.4 and input x=3, with η=0.05, calculate Δw.
0.06
0.03
0.08
0.05
What is the Manhattan distance between (2, 4) and (5, 8)?
5
7
6
4
If x = np.array([1,2,3]), what is x + x[::-1]?
[4 4 4]
[2 4 6]
[3 4 4]
Error
Gibbs Algorithm selects hypotheses based on:
Randomization
Distance
Posterior probabilities
Time complexity
Perceptron weights are [1, -1], input is [2, 2], threshold is 0. What is the output?
0
1
2
-2
A test point lies at distances [1.2, 1.8, 2.0] from 3 neighbors (classes A, B, A). Using inverse
A
B
C
Cannot determine
In which case would weight update be minimal in backpropagation?
Large error
Small gradient
High input value
High learning rate
The main advantage of case-based reasoning is:
Requires no training
Fast prediction
Generalizes poorly
Learns without data
If BOC combines 3 hypotheses with individual errors 0.2, 0.3, 0.4, what is the best-case BOC
< 0.2
0.3
0.25
0.4
What does np.random.seed(42) ensure?
Same output every time
Faster random
GPU support
Parallel sampling
Which condition leads to the collapse of version space?
No positive example
Redundant attributes
Conflicting examples
Too many generalizations
The general-to-specific ordering of hypotheses is based on:
Accuracy
Coverage
Specificity
Generalization
LWR on 8000 samples takes 0.8 seconds to predict one output. What’s the estimated time
80 sec
160 sec
0.16 sec
200 sec
A system evaluates 60 cases and selects 3 top matches. How many were ignored in the final
57
3
30
33
You have 3 features with information gains: A=0.2, B=0.3, C=0.1. Which one is selected by
A
B
C
Any
Update rule for perceptron adjusts weights only when:
Correctly classified
Output = 1
Misclassified
Always
Deep networks are better than shallow ones because:
Easier to train
Need less data
Learn complex functions
Use few neurons
What happens if crossover probability is set to 0?
No offspring
Max mutation
Constant parents
All solutions same
A 3-layer DNN with 100, 50, and 10 neurons respectively has how many parameters (weights
3050
3020
2500
4010
Which of the following is NOT a genetic operator?
Selection
Evaluation
Mutation
Crossover
An RBF network has three centers: c1 = [1,1], c2 = [4,4], c3 = [7,7]. Input x = [4,4]. Which center
c1
c2
c3
All Equal
Which function in Pandas loads multiple sheets from Excel?
pd.read_excel()
pd.load_excel()
pd.read_xls()
pd.excel_load()
Which Pandas method saves DataFrame in compressed .zip format?
to_csv(compression=)
to_zip()
compress_csv()
export_zip()
What happens if you save a DataFrame using to_csv() without specifying index=False?
Index is saved
Only values are saved
Header is missing
File is corrupted
What type of learning does not require labeled data?
Reinforcement
Supervised
Semi-supervised
Unsupervised
Given an input [1, 0, 1] and weights [0.5, 0.2, 0.3], what is the neuron output before applying
0.5
0.8
1
0.3
If an attribute has 4 possible values, how many minimal generalizations are there when
1
2
3
4
In model selection, BIC prefers models with...
High likelihood &
Low likelihood
Many params
Small dataset
In decision trees, which attribute is chosen at each node?
One with smallest value
Randomly selected
One with highest information gain
One with least support
Given a = np.array([1,2,3,4,5]), what is a[a%2 == 0]?
[2 4]
[1 3 5]
[0 2 4]
[2 3 4]
Decision tree pruning is used to:
Add more branches
Remove underfitting
Reduce overfitting
Increase tree height
A learning algorithm that assumes feature independence follows what kind of bias?
Interaction bias
Independence bias
Naïve bias
Structural bias
RBF networks are best suited for:
Time series
Classification with
Image segmentation
Reinforcement learning
Which activation function is prone to vanishing gradients?
ReLU
Sigmoid
Softmax
Max Pool
You roll a biased die: P(6)=0.3, P(1–5)=0.14 each. Given an even number, what's the probability?
0.3
0.35
0.5
0.21
Why can MDL avoid overfitting?
Adds noise
Ignores likelihood
Penalizes complexity
Maximizes entropy
What makes RBF networks different from standard MLPs?
Linear activation
Radial symmetry in
Binary output
Normalized input
Dataset has 100 samples. Model A log-likelihood is -230, B is -200. Which has higher likelihood?
Model A
Model B
Equal
Cannot determine
If P(h)=0.3, P(D|h)=0.5, compute P(h|D) assuming normalizer P(D)=0.5.
0.3
0.5
0.15
0.6
Fitness function is used to:
Train classifier
Evaluate performance
Combine layers
Stop training
What is the probability that Gibbs picks a correct hypothesis from H={h1,h2} with
0.7
0.5
1
0.3
The depth of a decision tree indicates:
Number of classes
Size of dataset
Number of attributes
Complexity of decisions
In a 1D Gaussian RBF ϕ(x)=exp(−(x−c)2/2) , what is the output when x = 2 and c = 2?
0
0.5
1
e−1
Given weights [0.2, 0.4] and inputs [1, -1], with bias 0.1, compute the perceptron output using
0
1
-1
0.5
Chebyshev distance between (3,1) and (6,4) is:
3
2
1
5
What file format is used by np.save()?
.npy
.npz
.csv
.txt
What type of algorithm is backpropagation?
Supervised
Unsupervised
Semi-supervised
Reinforcement
You use 1-NN on a noisy dataset and get unstable predictions. What’s a good fix?
Use k=3
Drop outliers
Normalize again
Add features
Using sigmoid activation, what is the output if net input is 0.5? (approx.)
0.73
0.62
0.5
0.45
When does increasing k in KNN result in higher misclassification on boundaries?
When noisy
Low-dimensional
Minority near majority
All of the above
A gradient of 0 means:
No weight change
Full update
Reset weights
Faster convergence
Which Pandas function is used to combine data along columns with alignment on indexes?
join()
concat()
merge()
groupby()
P(A)=0.6, P(B|A)=0.5, P(B|¬A)=0.2. Find P(B).
0.38
0.42
0.44
0.36
A real-time system must predict class within 5ms. KNN is used on a dataset with 10,000
Accuracy low
Not real-time
High prediction latency
Too simple
Why does the Candidate Elimination algorithm fail with noisy labels?
It has no bias
It requires clustering
It assumes consistency
It lacks optimization
If the hypothesis space has 2N elements and one hypothesis is eliminated per example, how
log2N
N
2N
N/2
A learning problem has 1000 examples and 10 candidate concepts. What is the probability of
0.1
1
0.9
0.01
Which of these is valid for NumPy broadcasting?
(3,1) + (1,4)
(3,2) + (3,4)
(5,5) + (5,)
All except B
Input x = [3,4], center c = [0,0]; compute RBF value with σ=5 .
e−1
e−0.5
e−0.32
e−2
How does inductive bias improve learning in high-dimensional spaces?
Removes noise
Reduces hypothesis
Prevents generalization
Avoids test error
Which function is used to introduce non-linearity in neural networks?
Weight function
Bias function
Activation function
ReLU layer
