🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Logistic Regression from Scratch: all 10 questions

Quiz: Logistic Regression from Scratch · Question 3 of 10

What does this print? (code)

What does this print?

import math
p = 0.5
print(round(-math.log(p), 3))
  1. A.0.5
  2. B.0.693
  3. C.1.0
  4. D.0.301
Answer & explanation

Correct answer: 0.693

−ln(0.5) = ln 2 ≈ 0.693, the log loss of a model that always guesses 50%.

Can you get the rest right without peeking?

Take the timed Quiz: Logistic Regression from Scratch quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →