[R] Fw: add objects to svm plot

Sean Davis sdavis2 at mail.nih.gov
Mon May 17 13:09:34 CEST 2004


Reposting to the group for input....

Thanks for any help you can provide.

Sean
----- Original Message -----
From: <ale.ambrosi at unipd.it>
To: <sdavis2 at mail.nih.gov>
Sent: Monday, May 17, 2004 4:22 AM
Subject: add objects to svm plot


>
> >at 06.38 14/05/2004 -0400, you wrote:
> >It might be helpful if you could send your code to the list along with
any
> >error messages, etc.
> >
> >Sean
>
> Dear Sean,
>
> Thank so much for your answer.
> I try to give you the idea of my problem by means a simple example
>
> To give a more precise idea here I make a simple example.
> First of all I train a SVM.
>
> > m.svm <- svm(status~., data = dati.svm,
> kernel="radial", cross=20, scale=TRUE
> )
>
> dati.svm is a data.frame with four column, say: v.1, v.2, v.3, status.
> Then I generates a scatter plot of a svm fit:
>
> > plot.svm(m.svm, data=dati.svm, v.1 ~ v.2, slice = list(...),
>         grid = 100)
>
> This works well; regions and support vectors are plotted.
> the secon step is my problem.
> I have some data frames of points relatives to different samples,
> say dati.1, dati.2,... (of the same kind of dati.svm). I'd like to
> add them to the plot, each with different symbol and their (elliptic)
hull.
> I hope to be clear.
> How can I do it?
>
> Please, could you help me or give me some hints to solve?
>
> thanks,
> Alessandro
>
>
> BTW: Are there any way to reppresent the model giving (the idea of) a
> third dimension?
>
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Alessandro Ambrosi, Ph.D.       |
> Oncological Surgical Sc. Dept.  | mail: ale.ambrosi at unipd.it
> Surg. Cl. II |       ambrosi at stat.unipd.it
> University of Padua | fax:  +39 049 651891
> via Giustiniani, 2 | tel:  +39 049 8212055
> I-35128 Padua (ITALY)           | url:  www.stat.unipd.it/~ambrosi
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>
> -------------------------------------------------
> This mail sent through IMP: webmail.unipd.it
>




More information about the R-help mailing list