[BioC] xval in MLInterfaces package

Wu, Xiwei XWu at coh.org
Wed Jun 28 01:55:42 CEST 2006


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



More information about the Bioconductor mailing list