← All interview questions

Skill Zuno · skillzunos.com · Python ML

Logistic Regression interview questions

Prepare for Logistic Regression interviews on Skill Zuno. This practice book covers Logistic Regression interview questions across New, Easy, Medium, Hard, and Diff levels so you can work through real interview-style problems on skillzunos.com.

Open Logistic Regression on Skill Zuno

Also see the Logistic Regression tutorial.

Logistic regression is a linear model for classification. It passes a weighted sum of the features through the sigmoid function to predict the probability of the positive class, and it is trained by minimising log loss (cross-entropy). Interviews test the maths behind it, how to read its coefficients, regularisation, and how to evaluate a classifier.

Sample Logistic Regression interview questions

Why is it called regression if it is used for classification?

It models the log-odds of the positive class as a linear function of the features. The class comes from thresholding the predicted probability, usually at 0.5.

Why use log loss instead of mean squared error?

Combined with the sigmoid, mean squared error gives a non-convex loss with poor gradients. Log loss is convex, so gradient descent reaches the global minimum, and minimising it is maximum likelihood under a Bernoulli model.

How do you interpret a coefficient?

Increasing a feature by one unit, with the others held fixed, multiplies the odds of the positive class by e raised to that coefficient. A coefficient of 0.7 roughly doubles the odds.

What does C mean in scikit-learn's LogisticRegression?

C is the inverse of regularisation strength: a smaller C means stronger regularisation. The default penalty is L2; L1 can shrink coefficients to exactly zero and so selects features.

How do you handle imbalanced classes?

Use class_weight="balanced" or resample the data, tune the decision threshold, and judge the model by precision, recall and PR AUC rather than accuracy.

What you can practice

  • Logistic Regression interview questions for beginners and experienced developers
  • Level-based practice: New, Easy, Medium, Hard, and Diff
  • Python ML topics alongside Logistic Regression on skillzunos.com

More Python ML interview questions

All interview questions