Imagine i have some classifier, which given some point on the plane produces the label for this point. I want to plot decision regions such as :
I’ve ended up with something like this:
function decision_region(clf) xgrid = collect(-2 : 0.05 : 3) ygrid = collect(-5 : 0.05 : 3) bound(u, v) = encodemap(predict(clf, Matrix([u v]))) contour(xgrid, ygrid, bound) end
which produces very wiggly boundary, also there are no colors for regions:
How can i produce more pleasant pictures with decision regions colored according to label?