How to import the original data into knncat?
1
0
Entering edit mode
Liu, Xin ▴ 120
@liu-xin-811
Last seen 10.2 years ago
Dear all, The following example in the package of knncat run well in R, so we hope to cluster our data just following this. The problem is how to import the data, how to build the vector and matrix? The first collumn should be the indentifier? the second collumn should be the expression average? and the third collumn should be the classifier? The data should be imported as a text file, Excel file or other type of file? Any clue? Thanks a lot! library(MASS) # Load data set syncat <- knncat synth.tr, classcol=3) ## Not run: syncat Train set misclass rate: 16.8 synpred <- predict (syncat, synth.tr, synth.te, train.classcol=3, newdata.classcol=3) table (synpred, synth.te$yc) synpred 0 1 0 466 61 1 34 439 # # Or do the whole thing in one pass: # ## End(Not run) knncat synth.tr, synth.te, classcol=3) ## Not run: Test set misclass rate: 9.5 ## End(Not run) Xin LIU This e-mail is from ArraGen Ltd The e-mail and any files transmitted with it are confidential and privileged and intended solely for the use of the individual or entity to whom they are addressed. Any unauthorised direct or indirect dissemination, distribution or copying of this message and any attachments is strictly prohibited. If you have received the e-mail in error please notify helpdesk@arragen.com or telephone +44 28 38 363841 and delete the e-mail from your system. E-mail and other communications sent to this company may be reviewed or read by persons other than the intended recipient. Viruses : although we have taken steps to ensure that this e-mail and any attachments are free from any virus, you should, in keeping with good practice, ensure that they are actually virus free. ArraGen Ltd. Registration Number NI 43067 Registered Address : Almac House, 20 Seagoe Industrial Estate, Craigavon, BT63 5QD
• 1.6k views
ADD COMMENT
0
Entering edit mode
@sean-davis-490
Last seen 3 months ago
United States
This is a useful read: cran.r-project.org/doc/manuals/R-data.pdf Sean On 6/15/04 10:53 AM, "Liu, Xin" <xin.liu@arragen.com> wrote: > Dear all, > > The following example in the package of knncat run well in R, so we hope to > cluster our data just following this. The problem is how to import the data, > how to build the vector and matrix? The first collumn should be the > indentifier? the second collumn should be the expression average? and the > third collumn should be the classifier? The data should be imported as a text > file, Excel file or other type of file? Any clue? Thanks a lot! > > library(MASS) # Load data set > syncat <- knncat synth.tr, classcol=3) > ## Not run: > syncat > Train set misclass rate: 16.8 > synpred <- predict (syncat, synth.tr, synth.te, train.classcol=3, > newdata.classcol=3) > table (synpred, synth.te$yc) > > synpred 0 1 > 0 466 61 > 1 34 439 > # > # Or do the whole thing in one pass: > # > ## End(Not run) > knncat synth.tr, synth.te, classcol=3) > ## Not run: > Test set misclass rate: 9.5 > ## End(Not run) > > Xin LIU > > > > This e-mail is from ArraGen Ltd > > The e-mail and any files transmitted with it are confidential and privileged > and intended solely for the use of the individual or entity to whom they are > addressed. > > Any unauthorised direct or indirect dissemination, distribution or copying of > this message and any attachments is strictly prohibited. > > If you have received the e-mail in error please notify helpdesk@arragen.com or > telephone +44 28 38 363841 and delete the e-mail from your system. > > E-mail and other communications sent to this company may be reviewed or read > by persons other than the intended recipient. > > Viruses : although we have taken steps to ensure that this e-mail and any > attachments are free from any virus, you should, in keeping with good > practice, ensure that they are actually virus free. > > ArraGen Ltd. Registration Number NI 43067 > Registered Address : Almac House, 20 Seagoe Industrial Estate, Craigavon, > BT63 5QD > > _______________________________________________ > Bioconductor mailing list > Bioconductor@stat.math.ethz.ch > https://www.stat.math.ethz.ch/mailman/listinfo/bioconductor >
ADD COMMENT

Login before adding your answer.

Traffic: 586 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6