# Logistic Regression

Find the probability of data samples belonging to a specific class with one of the most popular classification algorithms.

Start## Key Concepts

Review core concepts you need to learn to master this subject

Scikit-Learn *Logistic Regression* Implementation

*Logistic Regression* sigmoid function

*Classification Threshold* definition

*Logistic Regression* interpretability

*Log-Odds* calculation

Logistic Regression Classifier

*Logistic Regression* prediction

*Logistic Regression* cost function

Scikit-Learn *Logistic Regression* Implementation

Scikit-Learn *Logistic Regression* Implementation

*Scikit-Learn* has a *Logistic Regression* implementation that fits a model to a set of training data and can classify new or test data points into their respective classes. All important parameters can be specified, as the norm used in penalizations and the solver used in optimization.

- 1When an email lands in your inbox, how does your email service know whether it’s a real email or spam? This evaluation is made billions of times per day, and one way it can be done is with Logistic…
- 2With the data from Codecademy University, we want to predict whether each student will pass their final exam. And the first step to making that prediction is to predict the probability of each stud…
- 3We saw that the output of a Linear Regression model does not provide the probabilities we need to predict whether a student passes the final exam. Step in
In Logistic Re…**Logistic Regression!** - 5How did our Logistic Regression model create the S-shaped curve we previously saw? The answer is the
. The Sigmoid Function is a special case of the more general _Logistic…**Sigmoid Function** - 6Now that we understand how a Logistic Regression model makes its probability predictions, what coefficients and intercept should we use in our model to best predict whether a student will pass the …
- 7J(\mathbf{b}) = -\frac{1}{m}\sum_{i=1}^{m} [y^{(i)}log(h(z^{(i)})) + (1-y^{(i)})log(1-h(z^{(i)}))] Let’s go ahead and break down our log-loss function into two separate parts so it begins to make…
- 8Many machine learning algorithms, including Logistic Regression, spit out a classification probability as their result. Once we have this probability, we need to make a decision on what class the s…
- 9Now that you know the inner workings of how Logistic Regression works, let’s learn how to easily and quickly create Logistic Regression models with sklearn! [sklearn](http://scikit-learn.org/stable…
- 10One of the defining features of Logistic Regression is the interpretability we have from the feature coefficients. How to handle interpreting the coefficients depends on the kind of data you are wo…

## What you'll create

Portfolio projects that showcase your new skills

## How you'll master it

Stress-test your knowledge with quizzes that help commit syntax to memory