November 2017
Intermediate to advanced
1035 pages
11h 31m
English
Linear models can actually be used for classification tasks. This involves fitting a linear model to the probability of a certain class, and then using a function to create a threshold at which we specify the outcome of one of the classes.
The function used here is typically the logistic function (surprise!). It's a pretty simple function:

Visually, it looks like the following:

Let's use the make_classification method, create a dataset, and get to classifying:
>>> from sklearn.datasets ...Read now
Unlock full access