1. Home
  2. Data Science
  3. Scikit-learn
  4. In scikit-learn's LogisticRegression, what does a very…

Added 30 Nov -0001

In scikit-learn's LogisticRegression, what does a very small value of C do to the fitted model?

  1. It applies weak regularisation, allowing the coefficients to grow freely
  2. It disables regularisation entirely, matching unpenalised maximum likelihood
  3. It caps the number of solver iterations, so the fit stops early in training
  4. It applies strong regularisation, shrinking the coefficients toward zero Correct answer

Correct answer

D. It applies strong regularisation, shrinking the coefficients toward zero

17 views

MCQSEXAM

Explanation

In scikit-learn, C is the inverse of the regularisation strength, so a small C penalises the loss heavily and shrinks coefficients, producing a simpler and more biased model. C is not the alpha of Ridge or Lasso, where larger values mean more regularisation, so the two conventions must not be confused. The default C=1.0 applies a moderate L2 penalty unless penalty='l1' or 'elasticnet' is chosen.

Reference

Asked in: NTS, PPSC IT, Interviews

Preparing for an exam?

Doubts & discussion

Not sure why the answer is D? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More Scikit-learn MCQs

Practise all Scikit-learn MCQs

Similar MCQs