xval in MLInterfaces package
3
0
Entering edit mode
Wu, Xiwei ▴ 350
@wu-xiwei-1102
Last seen 10.3 years ago
Hi, all, I am testing the xval() function under MLInterfaces package following the documentation. > lk1 <- xval(smallG, "ALL.AML", knnB, xvalMethod="LOO", group=as.integer(0)) I am wondering when I invoke above, is knnB being invoked with the default set of parameters to do Leave-One-Out cross validation? If so, is it possible to specify my own parameters, such as k and l? Thanks in advance. Xiwei Wu, MD, PhD Director, Affymetrix Core Facility Assistant Research Scientist Department of Biomedical Informatics Beckman Research Institute City of Hope National Medical Center Duarte, CA 91010 Phone: (626) 359-8111 ext. 65071 "EMF <coh.org>" made the following annotations. ---------------------------------------------------------------------- -------- SECURITY/CONFIDENTIALITY WARNING: This message and any atta...{{dropped}}
MLInterfaces MLInterfaces • 1.3k views
ADD COMMENT
0
Entering edit mode
@martin-morgan-1513
Last seen 5 months ago
United States
Yes, knnB is invoked with default parameters, and does leave-one-out cross-validation. Adding k and l as named arguments (e.g, k=2) to xval should change the values of these parameters in knnB. lk1 <- xval(smallG, "ALL.AML", knnB, xvalMethod = "LOO", group = as.integer(0), k=2) Does this work for you? Martin "Wu, Xiwei" <xwu at="" coh.org=""> writes: > Hi, all, > > I am testing the xval() function under MLInterfaces package following > the documentation. > >> lk1 <- xval(smallG, "ALL.AML", knnB, xvalMethod="LOO", > group=as.integer(0)) > > I am wondering when I invoke above, is knnB being invoked with the > default set of parameters to do Leave-One-Out cross validation? If so, > is it possible to specify my own parameters, such as k and l? > > Thanks in advance. > > Xiwei Wu, MD, PhD > Director, Affymetrix Core Facility > Assistant Research Scientist > Department of Biomedical Informatics > Beckman Research Institute > City of Hope National Medical Center > Duarte, CA 91010 > Phone: (626) 359-8111 ext. 65071 > > "EMF <coh.org>" made the following annotations. > -------------------------------------------------------------------- ---------- > SECURITY/CONFIDENTIALITY WARNING: This message and any atta...{{dropped}} > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
ADD COMMENT
0
Entering edit mode
Wu, Xiwei ▴ 350
@wu-xiwei-1102
Last seen 10.3 years ago
Marin, Thank you very much for your hint. It seems to be working as far as the group parameter is defined. Otherwise, it will ignore the k parameter. I thought group parameter is not necessary if "LOO" is specified. See below: > lk1 <- xval(smallG, "ALL.AML", knnB, xvalMethod = "LOO", k=1) > table(given=smallG$ALL.AML, predicted=lk1) predicted given ALL AML ALL 37 10 AML 10 15 > lk1 <- xval(smallG, "ALL.AML", knnB, xvalMethod = "LOO",k=2) > table(given=smallG$ALL.AML, predicted=lk1) predicted given ALL AML ALL 37 10 AML 10 15 > lk1 <- xval(smallG, "ALL.AML", knnB, xvalMethod = "LOO",group=as.integer(0), k=1) > table(given=smallG$ALL.AML, predicted=lk1) predicted given ALL AML ALL 37 10 AML 10 15 > lk1 <- xval(smallG, "ALL.AML", knnB, xvalMethod = "LOO",group=as.integer(0), k=2) > table(given=smallG$ALL.AML, predicted=lk1) predicted given ALL AML ALL 34 13 AML 9 16 Xiwei -----Original Message----- From: Martin Morgan [mailto:mtmorgan@fhcrc.org] Sent: Tuesday, June 27, 2006 4:39 PM To: Wu, Xiwei Cc: bioconductor at stat.math.ethz.ch Subject: Re: [BioC] xval in MLInterfaces package Yes, knnB is invoked with default parameters, and does leave-one-out cross-validation. Adding k and l as named arguments (e.g, k=2) to xval should change the values of these parameters in knnB. lk1 <- xval(smallG, "ALL.AML", knnB, xvalMethod = "LOO", group = as.integer(0), k=2) Does this work for you? Martin "Wu, Xiwei" <xwu at="" coh.org=""> writes: > Hi, all, > > I am testing the xval() function under MLInterfaces package following > the documentation. > >> lk1 <- xval(smallG, "ALL.AML", knnB, xvalMethod="LOO", > group=as.integer(0)) > > I am wondering when I invoke above, is knnB being invoked with the > default set of parameters to do Leave-One-Out cross validation? If so, > is it possible to specify my own parameters, such as k and l? > > Thanks in advance. > > Xiwei Wu, MD, PhD > Director, Affymetrix Core Facility > Assistant Research Scientist > Department of Biomedical Informatics > Beckman Research Institute > City of Hope National Medical Center > Duarte, CA 91010 > Phone: (626) 359-8111 ext. 65071 > > "EMF <coh.org>" made the following annotations. > ---------------------------------------------------------------------- > -------- SECURITY/CONFIDENTIALITY WARNING: This message and any > atta...{{dropped}} > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: > http://news.gmane.org/gmane.science.biology.informatics.conductor
ADD COMMENT
0
Entering edit mode
@martin-morgan-1513
Last seen 5 months ago
United States
Xiwei -- The intention was probably that 'group' could be missing, but the way the code is currently written you will need to specify group=as.integer(0) if you want to give additional parameters to knnB. 'L00' is still used as the method of cross-validation, unless a different 'xvalMethod' is specified. Hopefully this will be fixed in the next release of Bioconductor. Martin "Wu, Xiwei" <xwu at="" coh.org=""> writes: > Marin, > > Thank you very much for your hint. It seems to be working as far as the > group parameter is defined. Otherwise, it will ignore the k parameter. I > thought group parameter is not necessary if "LOO" is specified. See > below: > >> lk1 <- xval(smallG, "ALL.AML", knnB, xvalMethod = "LOO", k=1) >> table(given=smallG$ALL.AML, predicted=lk1) > predicted > given ALL AML > ALL 37 10 > AML 10 15 >> lk1 <- xval(smallG, "ALL.AML", knnB, xvalMethod = "LOO",k=2) >> table(given=smallG$ALL.AML, predicted=lk1) > predicted > given ALL AML > ALL 37 10 > AML 10 15 >> lk1 <- xval(smallG, "ALL.AML", knnB, xvalMethod = > "LOO",group=as.integer(0), k=1) >> table(given=smallG$ALL.AML, predicted=lk1) > predicted > given ALL AML > ALL 37 10 > AML 10 15 >> lk1 <- xval(smallG, "ALL.AML", knnB, xvalMethod = > "LOO",group=as.integer(0), k=2) >> table(given=smallG$ALL.AML, predicted=lk1) > predicted > given ALL AML > ALL 34 13 > AML 9 16 > > Xiwei > -----Original Message----- > From: Martin Morgan [mailto:mtmorgan at fhcrc.org] > Sent: Tuesday, June 27, 2006 4:39 PM > To: Wu, Xiwei > Cc: bioconductor at stat.math.ethz.ch > Subject: Re: [BioC] xval in MLInterfaces package > > Yes, knnB is invoked with default parameters, and does leave-one-out > cross-validation. Adding k and l as named arguments (e.g, k=2) to xval > should change the values of these parameters in knnB. > > lk1 <- xval(smallG, "ALL.AML", knnB, xvalMethod = "LOO", > group = as.integer(0), k=2) > > Does this work for you? > > Martin > > "Wu, Xiwei" <xwu at="" coh.org=""> writes: > >> Hi, all, >> >> I am testing the xval() function under MLInterfaces package following >> the documentation. >> >>> lk1 <- xval(smallG, "ALL.AML", knnB, xvalMethod="LOO", >> group=as.integer(0)) >> >> I am wondering when I invoke above, is knnB being invoked with the >> default set of parameters to do Leave-One-Out cross validation? If so, > >> is it possible to specify my own parameters, such as k and l? >> >> Thanks in advance. >> >> Xiwei Wu, MD, PhD >> Director, Affymetrix Core Facility >> Assistant Research Scientist >> Department of Biomedical Informatics >> Beckman Research Institute >> City of Hope National Medical Center >> Duarte, CA 91010 >> Phone: (626) 359-8111 ext. 65071 >> >> "EMF <coh.org>" made the following annotations. >> ---------------------------------------------------------------------- >> -------- SECURITY/CONFIDENTIALITY WARNING: This message and any >> atta...{{dropped}} >> >> _______________________________________________ >> Bioconductor mailing list >> Bioconductor at stat.math.ethz.ch >> https://stat.ethz.ch/mailman/listinfo/bioconductor >> Search the archives: >> http://news.gmane.org/gmane.science.biology.informatics.conductor
ADD COMMENT

Login before adding your answer.

Traffic: 514 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