The perceptron algorithm tries to find any linear boundary to perfectly separate the classes. It updates the weights of the linear model sequentially for each training instance in each training step in the direction of correct classification. This is repeated until a chosen precision or maximum of iterations is reached.
val clf = new PerceptronClassifier()
Applying the same feature transformation as above, also this linear algorithm can solve the circular data task.
val clf = new PerceptronClassifier(degree=2)