Hello, In the attached file training.csv (I apologize for the large file) I have 238 objects belonging to 13 classes, which are described by 183 properties. I would like to find a svm model for these objects. I tried the following R statements. library('e1071') datatraining <- read.csv("training.csv",head=TRUE) names<-names(datatraining) print("before print(names)"); print(names) # There are 186 names, respectively 184 properties P3, P4 ... P1549 data <- subset(datatraining,select=c(-dataname_gen_spec,-Gen)) classes <- subset(datatraining,select=Gen) # There are 13 classes model <- svm(data,classes,type='C-classification',kernel='linear') print(sprintf("There are %d support vectors",model$tot.nSV)); # There are 176 support vectors print("before summary(model)"); summary(model) $index); print("before print(model$index)"); print(model$index); I expect that the index values are between 1 and 184, because there are 84 properties, but I get several indices larger than 200. What did I misunderstood? Any hint is very appreciated. Regards Juergen
Am Montag, den 08.06.2009, 18:20 +0200 schrieb Juergen Rose:> Hello, > > In the attached file training.csv (I apologize for the large file) I > have 238 objects belonging to 13 classes, which are described by 183 > properties. I would like to find a svm model for these objects. > > I tried the following R statements. > > library('e1071') > datatraining <- read.csv("training.csv",head=TRUE) > > names<-names(datatraining) > print("before print(names)"); print(names) > # There are 186 names, respectively 184 properties P3, P4 ... P1549 > > data <- subset(datatraining,select=c(-dataname_gen_spec,-Gen)) > classes <- subset(datatraining,select=Gen) > # There are 13 classes > > model <- svm(data,classes,type='C-classification',kernel='linear') > print(sprintf("There are %d support vectors",model$tot.nSV)); > # There are 176 support vectors > > print("before summary(model)"); summary(model) > $index); > print("before print(model$index)"); print(model$index); > > > I expect that the index values are between 1 and 184, because there are > 84 properties, but I get several indices larger than 200. What did I > misunderstood? > > Any hint is very appreciated. > > Regards JuergenHi, once again, I just recognized, that the support vectors are objects and not properties. So that my last question was nonsense. But the reason for my question was, that I would like to get the important properties from a svm model. Is there any way?> ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.
Am Montag, den 08.06.2009, 12:30 -0400 schrieb milton ruser:> Dear Rose, > > no attached file came with the message. > > bests > miltonI try once more to attache the file. I hope that 89 KB is not to large for the mailing list.> On Mon, Jun 8, 2009 at 12:20 PM, Juergen Rose <rose at rz.uni-potsdam.de> > wrote: > Hello, > > In the attached file training.csv (I apologize for the large > file) I > have 238 objects belonging to 13 classes, which are described > by 183 > properties. I would like to find a svm model for these > objects. > > I tried the following R statements. > > library('e1071') > datatraining <- read.csv("training.csv",head=TRUE) > > names<-names(datatraining) > print("before print(names)"); print(names) > # There are 186 names, respectively 184 properties P3, P4 ... > P1549 > > data <- subset(datatraining,select=c(-dataname_gen_spec,-Gen)) > classes <- subset(datatraining,select=Gen) > # There are 13 classes > > model <- > svm(data,classes,type='C-classification',kernel='linear') > print(sprintf("There are %d support vectors",model$tot.nSV)); > # There are 176 support vectors > > print("before summary(model)"); summary(model) > $index); > print("before print(model$index)"); print(model > $index); > > > I expect that the index values are between 1 and 184, because > there are > 84 properties, but I get several indices larger than 200. > What did I > misunderstood? > > Any hint is very appreciated. > > Regards Juergen > > > > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible > code. > >
Am Montag, den 08.06.2009, 18:33 +0200 schrieb Juergen Rose:> Am Montag, den 08.06.2009, 12:30 -0400 schrieb milton ruser: > > Dear Rose, > > > > no attached file came with the message. > > > > bests > > milton > > I try once more to attache the file. I hope that 89 KB is not to large > for the mailing list.I seems, that I am today not able to attach a file to my mails. Therefore I copied training.csv to webserver. It can be found at http://141.89.194.22/~rose/trainig.csv. Regards Juergen
On Jun 8, 2009, at 12:42 PM, Juergen Rose wrote:> Am Montag, den 08.06.2009, 18:33 +0200 schrieb Juergen Rose: >> Am Montag, den 08.06.2009, 12:30 -0400 schrieb milton ruser: >>> Dear Rose, >>> >>> no attached file came with the message. >>> >>> bests >>> milton >> >> I try once more to attache the file. I hope that 89 KB is not to >> large >> for the mailing list. > > I seems, that I am today not able to attach a file to my mails.Although the Posting Guide for R-help only mentions png, ps, and pdf attachments the General Instructions which it links to indicates: "You can use text/plain as well, or simply paste text into your message instead. " So if you had attached a file of type .txt, it should have come through.> > Therefore I copied training.csv to webserver. It can be found at > http://141.89.194.22/~rose/trainig.csv. > > Regards Juergen > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.David Winsemius, MD Heritage Laboratories West Hartford, CT
On Jun 8, 2009, at 12:42 PM, Juergen Rose wrote:> Am Montag, den 08.06.2009, 18:33 +0200 schrieb Juergen Rose: >> Am Montag, den 08.06.2009, 12:30 -0400 schrieb milton ruser: >>> Dear Rose, >>> >>> no attached file came with the message. >>> >>> bests >>> milton >> >> I try once more to attache the file. I hope that 89 KB is not to >> large >> for the mailing list. > > I seems, that I am today not able to attach a file to my mails. > Therefore I copied training.csv to webserver. It can be found at > http://141.89.194.22/~rose/trainig.csv.Not with my browser. -------------- Not Found The requested URL /~rose/trainig.csv was not found on this server. Apache Server at 141.89.194.22 Port 80 ------------ Try attaching with .txt filetype. David Winsemius, MD Heritage Laboratories West Hartford, CT
Am Montag, den 08.06.2009, 13:33 -0400 schrieb David Winsemius:> On Jun 8, 2009, at 12:42 PM, Juergen Rose wrote: > > > Am Montag, den 08.06.2009, 18:33 +0200 schrieb Juergen Rose: > >> Am Montag, den 08.06.2009, 12:30 -0400 schrieb milton ruser: > >>> Dear Rose, > >>> > >>> no attached file came with the message. > >>> > >>> bests > >>> milton > >> > >> I try once more to attache the file. I hope that 89 KB is not to > >> large > >> for the mailing list. > > > > I seems, that I am today not able to attach a file to my mails. > > Therefore I copied training.csv to webserver. It can be found at > > http://141.89.194.22/~rose/trainig.csv.Please try http://141.89.194.22/~rose/training.csv .> Not with my browser. > -------------- > Not Found > > The requested URL /~rose/trainig.csv was not found on this server. > Apache Server at 141.89.194.22 Port 80 > ------------ > > Try attaching with .txt filetype. > > David Winsemius, MD > Heritage Laboratories > West Hartford, CT >