Interview Q&A / Machine Learning

INTERVIEW Q&A · 55 QUESTIONS

Machine Learning interview questions

Supervised vs unsupervised learning, overfitting, metrics and the classic models, explained simply.

  1. What is the difference between linear regression and logistic regression?

    Linear regression predicts a continuous number, like a house price, by fitting a straight line. Logistic regression predicts the probability of a class, like spam or not spam, by passing a linear score through the sigmoid function so the output stays between 0 and 1.

    BeginnerIn-depth4 min read
  2. How does logistic regression turn a score into a probability?

    It computes a linear score z = w.x + b and passes it through the sigmoid 1/(1+e^-z), which squashes any number into 0 to 1. A threshold, usually 0.5, then converts the probability into a class.

    BeginnerQuick answer1 min read