Which means using linear machine learning models probably won’t model the real world very well.
This article will take a look at a non-linear data set, concentric circles, and see how we can apply a couple of machine learning and deep learning models to create a classification model.
There are many ways to approach this problem, and this article is not meant to be a complete body of work on the subject, but instead a more casual look at how to approach the problem.
scikit-learn: make_circles
The dataset was created with Scikit-Learns, make_circles, function. This creates a 2-class classification data which can clearly not be separated by a line. In this case we will need to add some non-linearity to our models.
First — lets see what happens when we try to use a linear model to separate this data.
LogisticRegression
As you can see — LogisticRegression is only able to separate the data as best it can along a straight line. This model wont do.
Lets look at a linear Support Vector Machine. Because this is also a linear model we would not expect it to perform any better. However we will also see that we can make Support Vector Machines perform very well.
#machine-learning #deep learning