How can I get the very same effect of this tutorial in Scikit Documentation with more than 2 classes? Let's say we'll keep only the first dataset (the linear separable one) and substitute it with n_classes=3 like in the following snippet:

X, y = make_classification(n_features=2, n_redundant=0, n_informative=2,
                          random_state=1, n_clusters_per_class=1, n_classes=3)
rng = np.random.RandomState(2)
X += 2 * rng.uniform(size=X.shape)
linearly_separable = (X, y)

datasets = [linearly_separable]

I'd like to get the very same effect with plotted the probabilities in a colormap.

Thank you!

  • $\begingroup$ What was wrong with your suggestion? $\endgroup$
    – WBM
    Feb 19, 2021 at 21:35


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.