[scikit-learn] Problems with plotting decision regions

Sebastian Raschka se.raschka at gmail.com
Tue Sep 13 11:03:16 EDT 2016


Thanks a lot, Jake,
‘viridis’ seems to work, indeed. I guess I should move this to the matplotlib bug tracker then.

Best,
Sebastian

> On Sep 13, 2016, at 10:58 AM, Jacob Vanderplas <jakevdp at cs.washington.edu> wrote:
> 
> It seems to work correctly if you replace the colormap with a continuous one like 'viridis'. I suspect this is a bug in matplotlib's ListedColormap,
>    Jake
> 
>  Jake VanderPlas
>  Senior Data Science Fellow
>  Director of Research in Physical Sciences
>  University of Washington eScience Institute
> 
> On Tue, Sep 13, 2016 at 7:47 AM, Sebastian Raschka <se.raschka at gmail.com> wrote:
> Hi, all,
> I am having some problems with showing decision regions in 2D if more than 4 classes are present. Really can’t figure out the source of the problem and would really appreciate some help if you have done this before or have any pointer since I am afraid that I am overlooking something really simple here.
> 
> I created a gist of 2 simple examples with images attached:
> 
> https://gist.github.com/rasbt/6fb65bba38b70e28e60a9842b988cc67
> 
> I think it is very likely that it is not a bug in scikit-learn but rather a matplotlib contourf bug? In case it is a bug at all …
> 
> Best,
> Sebastian
> _______________________________________________
> scikit-learn mailing list
> scikit-learn at python.org
> https://mail.python.org/mailman/listinfo/scikit-learn
> 
> _______________________________________________
> scikit-learn mailing list
> scikit-learn at python.org
> https://mail.python.org/mailman/listinfo/scikit-learn



More information about the scikit-learn mailing list