
This final set of Machine Learning MCQs moves into neural networks and ensemble methods. It covers perceptron outputs and the XOR limitation, ReLU, sigmoid and softmax, backpropagation and vanishing gradients, CNN output sizes and parameter counts, pooling, RNNs and LSTMs, dropout, and bagging, random forests, AdaBoost and gradient boosting. It is ideal for GATE DA, university semester exams and deep learning or ML interview rounds that mix calculation with intuition.
How to practise: read each question and tap the option you think is correct. You will see right away whether you got it, along with a short explanation, and your score is tracked at the bottom of the screen. This set has 18 questions.
Topics covered in this set
- Perceptron and linear separability
- Activation functions: ReLU, sigmoid, softmax
- Backpropagation, vanishing gradients and dropout
- CNN output size, parameters and pooling
- RNN and LSTM basics
- Bagging, random forest and boosting
Machine Learning MCQs with answers and explanations
Q1. A perceptron has weights w = (2, -1), bias b = -1 and step activation that outputs 1 if z > 0 and 0 otherwise. What is its output for input x = (1, 3)?
z = w . x + b
a) 1
b) -1
c) 0
d) 2
Q2. Why can a single-layer perceptron not learn the XOR function?
a) XOR is not linearly separable, and a single perceptron can only form a linear boundary
b) XOR requires more than two inputs
c) The perceptron learning rule has no learning rate
d) XOR outputs are continuous values
Q3. The ReLU activation is applied element-wise to the vector [-2, 0.5, 3]. What is the result?
ReLU(z) = max(0, z)
a) [-2, 0.5, 3]
b) [0, 0.5, 3]
c) [0, 0, 3]
d) [2, 0.5, 3]
Q4. A softmax output layer receives logits [2, 1, 0]. What is the probability assigned to the first class (approximately)?
softmax(z_i) = e^(z_i) / sum_j e^(z_j)
a) 0.50
b) 0.24
c) 0.09
d) 0.67
Q5. What does the backpropagation algorithm compute in a neural network?
a) Gradients of the loss with respect to every weight, using the chain rule from output to input
b) The optimal network architecture
c) The forward predictions only
d) The training data labels
Q6. A deep network using sigmoid activations in all hidden layers trains very slowly, and early layers barely change. What is the most likely cause?
a) Exploding learning rate
b) Too much training data
c) Vanishing gradients, since sigmoid derivatives are at most 0.25 and multiply across layers
d) Overly large batch normalisation
Q7. A 32 x 32 single-channel image is convolved with a 5 x 5 filter using stride 1 and no padding. What is the spatial size of the output feature map?
out = (n - f + 2p) / s + 1
a) 32 x 32
b) 27 x 27
c) 30 x 30
d) 28 x 28
Q8. A 7 x 7 input is convolved with a 3 x 3 kernel, padding 1 and stride 2. What is the output size?
a) 3 x 3
b) 4 x 4
c) 5 x 5
d) 7 x 7
Q9. A convolutional layer applies 16 filters of size 3 x 3 to an RGB input (3 channels), with one bias per filter. How many trainable parameters does it have?
a) 448
b) 432
c) 160
d) 144
Q10. A fully connected layer maps 100 inputs to 10 outputs with a bias for each output. How many parameters does it have?
a) 1000
b) 110
c) 1010
d) 1100
Q11. Which statement about a 2 x 2 max-pooling layer with stride 2 is correct?
a) It doubles the width and height of the feature map
b) It has no learnable parameters and halves the width and height
c) It learns a separate weight for each pooling window
d) It changes the number of channels to one
Q12. What was the main motivation for the LSTM architecture compared with a simple RNN?
a) To process images more efficiently than CNNs
b) To remove the need for backpropagation
c) To make the network purely feed-forward
d) To capture long-range dependencies by reducing the vanishing gradient problem using gates and a cell state
Q13. Bagging (bootstrap aggregating) of deep decision trees mainly improves performance by reducing which component of error?
a) Variance
b) Bias
c) Irreducible noise
d) Label imbalance
Q14. How does a random forest differ from plain bagging of decision trees?
a) It trains trees sequentially on residuals
b) It considers only a random subset of features at each split, decorrelating the trees
c) It uses a single very deep tree
d) It does not use bootstrap samples
Q15. In AdaBoost, what happens to the weights of training examples that the current weak learner misclassifies?
a) They are removed from the dataset
b) They are set to zero
c) They are increased so the next learner focuses on them
d) They remain unchanged
Q16. During training, each hidden unit is randomly switched off with probability 0.5 in every mini-batch. What is this technique and its purpose?
a) Batch normalisation, to speed up convergence
b) Max pooling, to reduce dimensions
c) Weight initialisation, to avoid symmetry
d) Dropout, to reduce overfitting by preventing co-adaptation of neurons
Q17. A bootstrap sample of size n is drawn with replacement from n training examples. For large n, roughly what fraction of the original examples appear in it at least once?
a) 63.2%
b) 50%
c) 36.8%
d) 100%
Q18. In gradient boosting with squared-error loss, what does each new tree try to fit?
a) The original target values from scratch
b) The residuals (negative gradients) of the current ensemble's predictions
c) A random bootstrap sample of the targets
d) The predictions of the previous tree
Quick revision notes
- Perceptron: y = step(w . x + b); learns only linearly separable functions (not XOR).
- ReLU = max(0, z); sigmoid in (0, 1); tanh in (-1, 1); softmax outputs sum to 1.
- Backpropagation = chain rule for gradients; sigmoid/tanh cause vanishing gradients in deep nets.
- Conv output size = floor((n - f + 2p)/s) + 1; conv params = (f x f x C_in + 1) x C_out.
- Pooling has no learnable parameters; LSTM/GRU gates handle long-term dependencies.
- Bagging reduces variance; bootstrap sample contains about 63.2% unique examples.
- Random forest = bagging + random feature subset at each split.
- Boosting is sequential and reduces bias: AdaBoost reweights samples, gradient boosting fits residuals.
Frequently asked questions
What is the difference between bagging and boosting?
Bagging trains models independently on bootstrap samples and averages them, which mainly reduces variance. Boosting trains models sequentially, each focusing on the errors of the previous ones, which mainly reduces bias but can overfit if run too long.
Why is ReLU preferred over sigmoid in hidden layers?
ReLU has a gradient of 1 for positive inputs, so gradients do not shrink as they pass through many layers, and it is cheap to compute. Sigmoid saturates for large inputs, producing tiny gradients that slow down training of deep networks.
When should I use a CNN versus an RNN?
Use a CNN for grid-like data such as images, where local patterns and weight sharing across positions matter. Use an RNN, LSTM or GRU for sequential data such as text or time series, where order and earlier context matter, although transformers are now common for long sequences.
Comments
Post a Comment