thecodingcompany
Technical MCQ

AI & Machine Learning Fundamentals

The theory round for AI, data and modern product roles.

Questions6
FormatMCQ + explanation

6 questions

Answer each one before scrolling to the solution. The explanation names the mechanism, not just the choice.

01Overfitting is best detected by:
  1. A.Low training error and high validation error
  2. B.High training error and low validation error
  3. C.Low error on both
  4. D.High error on both
Answer. The model has memorised the training data and fails to generalise; the gap between training and validation is the signal.
02Which technique is L2 regularisation?
  1. A.Lasso, adding the sum of absolute weights
  2. B.Ridge, adding the sum of squared weights
  3. C.Dropping random neurons
  4. D.Early stopping
Answer. L2 (Ridge) penalises the sum of squared weights, which shrinks coefficients smoothly. L1 (Lasso) penalises absolute weights and can drive them to zero.
03The purpose of a validation set is to:
  1. A.Train the weights
  2. B.Tune hyperparameters and detect overfitting
  3. C.Report the final accuracy
  4. D.Store production data
Answer. The validation set guides model selection and hyperparameter tuning; the test set is reserved for the final unbiased estimate.
04In a confusion matrix, precision is:
  1. A.TP / (TP + FN)
  2. B.TP / (TP + FP)
  3. C.(TP + TN) / total
  4. D.TN / (TN + FP)
Answer. Precision answers "of the items we flagged positive, how many truly were?" — the denominator is all predicted positives.
05A transformer’s self-attention mechanism primarily solves:
  1. A.Vanishing gradients in deep CNNs
  2. B.Modelling long-range dependencies without recurrence
  3. C.Reducing parameter count
  4. D.Data augmentation
Answer. Attention lets every token attend to every other token directly, giving long-range context without the sequential bottleneck of an RNN.
06Which statement about the bias–variance trade-off is correct?
  1. A.High bias means the model is too complex
  2. B.High variance means the model is too simple
  3. C.High bias underfits; high variance overfits
  4. D.Bias and variance are independent of model complexity
Answer. High bias corresponds to an oversimplified model that underfits. High variance corresponds to an over-flexible model that overfits.

Practise here. Get placed there.

Prep+ is unlimited practice. When you are ready to turn it into an offer, TCC Placement Partner handles portfolio, resume and interviews.