Chapter 2 · Machine learning basics
Logistic regression
Logistic regression squeezes a line through a sigmoid to give a probability between 0 and 1.
Chapter 2 · Machine learning basics
Logistic regression squeezes a line through a sigmoid to give a probability between 0 and 1.
A straight line escapes 0% and 100%.
A plain line can go below 0% and above 100%, which makes no sense for a probability. The sigmoid squeezes it into the range 0 to 1.
Compute a straight-line score from the input: score = steepness × hours + shift. It can be any number, big or small.
Green dots passed, coral dots failed. Shape the curve with the two sliders, or press Fit for me. Then slide the hours to read the probability for a new student.
A steeper curve is more sure of itself, and pays a big loss when it is sure and wrong. Fit for me runs gradient descent on the log loss, the same downhill loop as before.
What does the sigmoid do to a score?
The curve gives 0.5 for a student. What is that?
Logistic regression is mainly used to…