\HeaderA{knnB}{An interface to various machine learning methods for ExpressionSets}{knnB}
\aliasA{allClass}{knnB}{allClass}
\aliasA{allClass,classifOutput-method}{knnB}{allClass,classifOutput.Rdash.method}
\aliasA{baggingB}{knnB}{baggingB}
\aliasA{baggingB,ExpressionSet,character,integer-method}{knnB}{baggingB,ExpressionSet,character,integer.Rdash.method}
\aliasA{cvB}{knnB}{cvB}
\aliasA{cvB,ExpressionSet,character-method}{knnB}{cvB,ExpressionSet,character.Rdash.method}
\aliasA{distMat,MLOutput-method}{knnB}{distMat,MLOutput.Rdash.method}
\aliasA{gbmB}{knnB}{gbmB}
\aliasA{gbmB,ExpressionSet,character,integer-method}{knnB}{gbmB,ExpressionSet,character,integer.Rdash.method}
\aliasA{ipredknnB}{knnB}{ipredknnB}
\aliasA{ipredknnB,ExpressionSet,character,integer-method}{knnB}{ipredknnB,ExpressionSet,character,integer.Rdash.method}
\aliasA{knn1B}{knnB}{knn1B}
\aliasA{knn1B,ExpressionSet,character,integer-method}{knnB}{knn1B,ExpressionSet,character,integer.Rdash.method}
\aliasA{knnB,ExpressionSet,character,integer-method}{knnB}{knnB,ExpressionSet,character,integer.Rdash.method}
\aliasA{knnP}{knnB}{knnP}
\aliasA{last.warning}{knnB}{last.warning}
\aliasA{lcaB}{knnB}{lcaB}
\aliasA{lcaB,ExpressionSet,numeric-method}{knnB}{lcaB,ExpressionSet,numeric.Rdash.method}
\aliasA{ldaB}{knnB}{ldaB}
\aliasA{ldaB,ExpressionSet,character,integer-method}{knnB}{ldaB,ExpressionSet,character,integer.Rdash.method}
\aliasA{logitboostB}{knnB}{logitboostB}
\aliasA{logitboostB,ExpressionSet,character,integer,numeric-method}{knnB}{logitboostB,ExpressionSet,character,integer,numeric.Rdash.method}
\aliasA{lvq1B}{knnB}{lvq1B}
\aliasA{lvq1B,ExpressionSet,character,integer-method}{knnB}{lvq1B,ExpressionSet,character,integer.Rdash.method}
\aliasA{lvq2B}{knnB}{lvq2B}
\aliasA{lvq2B,ExpressionSet,character,integer-method}{knnB}{lvq2B,ExpressionSet,character,integer.Rdash.method}
\aliasA{lvq3B}{knnB}{lvq3B}
\aliasA{lvq3B,ExpressionSet,character,integer-method}{knnB}{lvq3B,ExpressionSet,character,integer.Rdash.method}
\aliasA{naiveBayesB}{knnB}{naiveBayesB}
\aliasA{naiveBayesB,ExpressionSet,character,integer-method}{knnB}{naiveBayesB,ExpressionSet,character,integer.Rdash.method}
\aliasA{nnetB}{knnB}{nnetB}
\aliasA{nnetB,ExpressionSet,character,integer-method}{knnB}{nnetB,ExpressionSet,character,integer.Rdash.method}
\aliasA{olvq1B}{knnB}{olvq1B}
\aliasA{olvq1B,ExpressionSet,character,integer-method}{knnB}{olvq1B,ExpressionSet,character,integer.Rdash.method}
\aliasA{pamrB}{knnB}{pamrB}
\aliasA{pamrB,ExpressionSet,character,integer-method}{knnB}{pamrB,ExpressionSet,character,integer.Rdash.method}
\aliasA{predLabels}{knnB}{predLabels}
\aliasA{predLabels,classifOutput-method}{knnB}{predLabels,classifOutput.Rdash.method}
\aliasA{predLabels,MLOutput-method}{knnB}{predLabels,MLOutput.Rdash.method}
\aliasA{qdaB}{knnB}{qdaB}
\aliasA{qdaB,ExpressionSet,character,integer-method}{knnB}{qdaB,ExpressionSet,character,integer.Rdash.method}
\aliasA{randomForestB}{knnB}{randomForestB}
\aliasA{randomForestB,ExpressionSet,character,integer-method}{knnB}{randomForestB,ExpressionSet,character,integer.Rdash.method}
\aliasA{RObject}{knnB}{RObject}
\aliasA{RObject,MLOutput-method}{knnB}{RObject,MLOutput.Rdash.method}
\aliasA{rpartB}{knnB}{rpartB}
\aliasA{rpartB,ExpressionSet,character,integer-method}{knnB}{rpartB,ExpressionSet,character,integer.Rdash.method}
\aliasA{show,membMat-method}{knnB}{show,membMat.Rdash.method}
\aliasA{show,MLOutput-method}{knnB}{show,MLOutput.Rdash.method}
\aliasA{show,probArray-method}{knnB}{show,probArray.Rdash.method}
\aliasA{show,probMat-method}{knnB}{show,probMat.Rdash.method}
\aliasA{show,qualScore-method}{knnB}{show,qualScore.Rdash.method}
\aliasA{show,silhouetteVec-method}{knnB}{show,silhouetteVec.Rdash.method}
\aliasA{sldaB}{knnB}{sldaB}
\aliasA{sldaB,ExpressionSet,character,integer-method}{knnB}{sldaB,ExpressionSet,character,integer.Rdash.method}
\aliasA{stat.diag.daB}{knnB}{stat.diag.daB}
\aliasA{stat.diag.daB,ExpressionSet,character,integer-method}{knnB}{stat.diag.daB,ExpressionSet,character,integer.Rdash.method}
\aliasA{svmB}{knnB}{svmB}
\aliasA{svmB,ExpressionSet,character,integer-method}{knnB}{svmB,ExpressionSet,character,integer.Rdash.method}
\aliasA{trainInds,classifOutput-method}{knnB}{trainInds,classifOutput.Rdash.method}
\keyword{classif}{knnB}
\begin{Description}\relax
This document describes a family of
wrappers of calls to machine learning classifiers
distributed through various R packages.
This particular document concerns the classifiers
for which training-vs-test set application makes sense.

For example, \code{knnB} is a wrapper for a call to \code{\LinkA{knn}{knn}} for objects
of class \code{ExpressionSet}. These interfaces, of the form \code{[f]B} provide a common calling
sequence and common return value for machine learning code in function \code{[f]}.

For details on the additional arguments that may be passed to any covered
machine learning function \code{f}, check the manual page for that function.
This will require loading the package in which \code{f} is found.
\end{Description}
\begin{Usage}
\begin{verbatim}
knnB(exprObj, classifLab, trainInd, k = 1, l = 1, prob = TRUE,
  use.all = TRUE, metric = "euclidean") 
#
# for such functions as nnetB, use the same first three
# parameters, and then add optional parameters from the nnet API
#
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{exprObj}] An instance of the \code{exprset} class. 
\item[\code{classifLab}] The name of the phenotype variable to use for classification. 
\item[\code{trainInd}] integer vector: Which elements are the training set. 
\item[\code{k}] The number of nearest neighbors. 
\item[\code{l}] See \code{knn} for a complete description. 
\item[\code{prob}] See \code{knn} for a complete description. 
\item[\code{use.all}] See \code{knn} for a complete description. 
\item[\code{metric}] See \code{knn} for a complete description. 
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
See \code{\LinkA{knn}{knn}} for a complete description of
parameters to and details of the k-nearest neighbor procedure
in the \code{class} package.

For other interfaces, such as ldaB, nnetB, rpartB, gbmB,
randomForestB, and so on, see the usage note above and
also see the man pages for those functions.  For each
of these functions you will need to attach the appropriate package
in order to examine the man page.

The \code{\LinkA{MLearn}{MLearn}}
interface is a more unified approach but is still maturing.
\end{Details}
\begin{Value}
An object of class \code{"\LinkA{classifOutput}{classifOutput.Rdash.class}"}
This class unifies the representation of results of machine
learning algorithms implemented by different designers.
\end{Value}
\begin{Author}\relax
Jess Mar, VJ Carey <stvjc@channing.harvard.edu>
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{xval}{xval}} for information on how
to obtain various cross-validated fits, and \code{\LinkA{MLearn}{MLearn}}
for a less fragmented implementation of the interface.
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
# access and trim an ExpressionSet
library(golubEsets)
data(Golub_Merge)
smallG <- Golub_Merge[1:60,]
# set a PRNG seed for reproducibilitiy
set.seed(1234) # needed for nnet initialization
# now run the classifiers
knnB( smallG, "ALL.AML", 1:40 )
nnetB( smallG, "ALL.AML", 1:40, size=5, decay=.01 )
lvq1B( smallG, "ALL.AML", 1:40 )
naiveBayesB( smallG, "ALL.AML", 1:40 )
svmB( smallG, "ALL.AML", 1:40 )
baggingB( smallG, "ALL.AML", 1:40 )
ipredknnB( smallG, "ALL.AML", 1:40 )
sldaB( smallG, "ALL.AML", 1:40 )
ldaB( smallG, "ALL.AML", 1:40 )
qdaB( smallG[1:10,], "ALL.AML", 1:40 )
pamrB( smallG, "ALL.AML", 1:40 )
rpartB( smallG, "ALL.AML", 1:35 )
randomForestB( smallG, "ALL.AML", 1:35 )
gbmB( smallG, "ALL.AML", 1:40, n.minobsinnode=3 , n.trees=6000)
stat.diag.daB( smallG, "ALL.AML", 1:40 )
\end{ExampleCode}
\end{Examples}

