Logistic Regression
Logistic Regression: Logistic Regression, Probabilities and the 0.5 Line.
Updated
- Logistic Regression (Journeyman): Logistic regression adds up a weighted score for each example, as a linear regression does, then bends it with an S-shaped curve into a probability between 0 and 1, which makes it a classifier despite its name, with C setting how simple scikit-learn keeps it and max_iter how long it may search.
- Probabilities and the 0.5 Line (Journeyman): predict_proba gives each example one probability per class, in the order of classes_, predict picks the class with the highest one, which for two classes is a line at 0.5, and the probability is the model's confidence, not a guarantee, so you can draw the line somewhere else when the job needs it.