Machine LearningLesson 84Free preview
Logistic Regression
This lesson is part of Python · All levels
Summary
Despite its name, logistic regression is a classification algorithm that predicts categories, such as spam or non-spam. The model uses the sigmoid function to convert the linear output to a probability between 0 and 1, then compares it to the generally classification limit of 0.5. sklearn provides LogisticRegression of the linear_model module along with predict_proba() to see the probability of each class. This algorithm is a strong baseline for the problem of binary classification.
Key points
- Logistic regression is used for classification, not value regression.
- The sigmoid function converts the score to probability 0 to 1.
- The general classification limit is 0.5
- Predict_proba() displays the probabilities of each class
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.