On 20/02/15 14:29, shalu jhanwar wrote:
> Hi guys,
>
> I am using SVM and Random forest classifiers from scikit learn. I wonder
> is it possible to plot the decision boundary of the model on my own
> training dataset so that I can have a feeling of the data? Is there any
> in-built example available in Scikit which I can refer to view " let's
> say margins and decision boundary" in SVM in my own data after selecting
> best model?


In 3D you want an algorithm known as "marching cubes". It is e.g. used 
in the isosurface function in VTK. In 2D there is a corresponding 
algorithm called "marching squares", which is e.g. implemented in the 
contour and contourf functions of matplotlib. You can use these to 
display the decision boundary.

Marching cubes is very easy to implement, and personally I use a Cython 
version to visualize data in 3D with OpenGL.

Your visualization is limited by human perception. This means that the 
maximum number of dimensions (parameters) you can naturally display on a 
screen is 2 without interactive rotation, but if you adda trackball or 
use a VR set you can show 3 dimensions.

Beyond 3D there are still things you can do to visualize:

- There is a transform that maps 4D to 3D similarly to a Mercator 
projection.

- You can also add movement to get yest another dimension.

- You can use gravity transform or multidimensional scaling to compress 
an N-dimensional dataset into a lower dimensional set.


Sturla



------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
_______________________________________________
Scikit-learn-general mailing list
Scikit-learn-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to