40 ML Interview Questions
40 ML Interview Questions
Questions that
You Must Know
Along with the solutions
Q1. Why do we take the harmonic mean of
precision and recall when finding the F1-
score and not simply the mean of the two
metrics?
2
F1 Score =
1 + 1
Recall Precision
Q2. Why does Logistic regression have
regression in its name even if it is used
specifically for Classification?
Logistic regression doesn’t directly classify but uses a
linear model to estimate the probability of an event (0-1).
We then choose a threshold (like 50%) to convert this to
categories like ‘yes’ or ‘no’. So, despite the ‘regression’ in
its name, it ultimately tells us which class something
belongs to.
Q3. What is the purpose of activation
functions in neural networks?
Activation functions introduce non-linearity to neural
networks, allowing them to learn complex patterns and
relationships in data. Without activation functions, neural
networks would reduce to linear models, limiting their
ability to capture intricate features. Popular activation
functions include sigmoid, tanh, and ReLU, each
introducing non-linearity at different levels.