Hi there..

There's the `decision_function(..)` method which you could use for this, im
sure:

 |
 |  decision_function(self, X)
 |      Distance of the samples X to the separating hyperplane.
 |      Parameters
 |      ----------
 |      X : array-like, shape = [n_samples, n_features]
 |
 |      Returns
 |      -------
 |      X : array-like, shape = [n_samples, n_class * (n_class-1) / 2]
 |          Returns the decision function of the sample for each class
 |          in the model.

This is in the svm documentation.
If you wish find hyperplane yourself and do this manually, have a look at
this example:
http://scikit-learn.org/stable/auto_examples/svm/plot_svm_margin.html

Hope this helps!

Regards,
Jaques

2012/8/1 abdalrahman eweiwi <[email protected]>

>
> Hi all,
>
> Is there a direct way to obtain the distance from the SVM seperating
> hyperplance to a test sample in sklearn? if no? Could you please direct me
> to the parameters I need in sklearn to obtain this distance?
>
> Thanks
>
> A.Eweiwi
>
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Scikit-learn-general mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
>
>
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Scikit-learn-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to