and one intercept (bfor each class the class for which the result of the classification confidence formula given here is highest is the assigned class labelw[ [ [ [ [px[pb the mathematics behind multiclass logistic regression differ somewhat from the onevs -rest approachbut they also result in one coefficient vector and intercept per classand the same method of making prediction is applied let' apply the one-vs -rest method to simple three-class classification dataset we use two-dimensional datasetwhere each class is given by data sampled from gaussian distribution (see figure - )in[ ]from sklearn datasets import make_blobs xy make_blobs(random_state= mglearn discrete_scatter( [: ] [: ]yplt xlabel("feature "plt ylabel("feature "plt legend(["class ""class ""class "]figure - two-dimensional toy dataset containing three classes supervised learning