Skip to content

Support Vector Machines

7 messages · excalibur, David Winsemius, Liaw, Andy +1 more

#
This question is still unanswered.

Someone can explain me how use the svm function to make density estimation ? 

Thanks ...
excalibur wrote:

  
    
#
On May 4, 2009, at 8:52 AM, excalibur wrote:

            
Unanswered questions are often those which do not comply with the  
guidelines in the Posting Guide. Many people have gotten tired of  
either making up examples or of writing  "Read the Posting Guide", so  
they just ignore them.
If you post an executable bit of code that shows how you are doing  
those operations, then I suspect someone will answer.
excalibur wrote:
David Winsemius, MD
Heritage Laboratories
West Hartford, CT
#
In the R-help of the svm function of the package e1071 it's explained that
this function also makes estimation of density.

But when i made for example
X<-rnorm(1000)
m<-svm(X)

I just have a binary classification of X like SVM do whereas i want an
estimation of the density which generates our sample X ...

I don't know if it's possible and if someone has already use this function
to do that.

Thanks.
David Winsemius wrote:

  
    
#
On May 5, 2009, at 3:49 AM, excalibur wrote:

            
Use str() to look at the object returned by svm. The example in svm's  
help page uses the svm object's "index" variable although there are  
other components that are available for extraction. The "fitted"  
vector looks to have similar binary properties to "index" and the "SV"  
vector appears to be a distance measure.
#
I see that index is giving me the group for the classification problem.

But my problem is not the same. I had a sample X<-rnorm(1000) for example.

I don't want to make classification (i have only one group in fact) but i
want to estimate the density which generates my sample (like i can do with
others methods like kernel density estimation, wavelets estimations, splines
...). 

So, logically, i hope i will find an approximation of the Gaussian density.

But i don't see how i can obtain this density estimation with the function
svm.

Thanks
David Winsemius wrote:

  
    
#
svm() in the e1071 package is an interface to the libsvm code.  Look at the link provided in the help page for that function.  You will have to read up how density estimation is achieved via one-class SVM.

Andy 

From: excalibur
Notice:  This e-mail message, together with any attachme...{{dropped:12}}
#
there is a SVM function in svmpath?by Trevor?Hastie. Before use it take time to read this 

http://www-stat.stanford.edu/~hastie/Papers/svmpath.pdf

If you install then svmpath library ! run the attach source file.


Justin BEM
BP 1917 Yaound?
T?l (237) 99597295
(237) 22040246 




________________________________
De : excalibur <servien.remi12 at yahoo.fr>
? : r-help at r-project.org
Envoy? le : Mardi, 5 Mai 2009, 8h49mn 49s
Objet?: Re: [R] Support Vector Machines


In the R-help of the svm function of the package e1071 it's explained that
this function also makes estimation of density.

But when i made for example
X<-rnorm(1000)
m<-svm(X)

I just have a binary classification of X like SVM do whereas i want an
estimation of the density which generates our sample X ...

I don't know if it's possible and if someone has already use this function
to do that.

Thanks.
David Winsemius wrote: