\HeaderA{MLearn-methods}{Methods for Function MLearn in Package `MLInterfaces'}{MLearn.Rdash.methods}
\aliasA{confuMatTrain}{MLearn-methods}{confuMatTrain}
\aliasA{confuMatTrain,classifOutput-method}{MLearn-methods}{confuMatTrain,classifOutput.Rdash.method}
\aliasA{es2df}{MLearn-methods}{es2df}
\aliasA{MLearn,formula,data.frame,character,numeric,ANY-method}{MLearn-methods}{MLearn,formula,data.frame,character,numeric,ANY.Rdash.method}
\aliasA{MLearn,formula,data.frame,character,numeric-method}{MLearn-methods}{MLearn,formula,data.frame,character,numeric.Rdash.method}
\aliasA{MLearn,formula,ExpressionSet,character,numeric,ANY-method}{MLearn-methods}{MLearn,formula,ExpressionSet,character,numeric,ANY.Rdash.method}
\aliasA{MLearn,formula,ExpressionSet,character,numeric-method}{MLearn-methods}{MLearn,formula,ExpressionSet,character,numeric.Rdash.method}
\aliasA{MLearn-OLD}{MLearn-methods}{MLearn.Rdash.OLD}
\aliasA{predLabelsTr}{MLearn-methods}{predLabelsTr}
\aliasA{predLabelsTr,classifOutput-method}{MLearn-methods}{predLabelsTr,classifOutput.Rdash.method}
\aliasA{tellMLearnMethods}{MLearn-methods}{tellMLearnMethods}
\keyword{methods}{MLearn-methods}
\begin{Description}\relax
Initial version of more lightweight interface; please do help(MLearn)
for the more recent schema-based approach.
\end{Description}
\begin{Section}{Methods}
\describe{

The parameters of the generic are \code{formula}, \code{data}, \code{method},
and \code{trainInds}.

The fundamental method employs a formula and a data.frame instance and
applies a machine learning algorithm identified by \code{method}, specifying
the training set indices for the training run.  An instance of \code{\LinkA{MLOutput-class}{MLOutput.Rdash.class}}
is returned.


An adaptation allows an \code{\LinkA{ExpressionSet}{ExpressionSet}} instance to be bound to
the \code{data} parameter.  The ExpressionSet and phenoData will be converted
to a data.frame instance using the internal \code{es2df} function, and this can be large.  Typically the genes will
be filtered before applying this procedure.

For this interface, one can obtain the training data confusion matrix using
\code{confuMatTrain}.  A slot \code{predLabelsTr} is populated for
this purpose, and an extractor method exists.
}
\end{Section}
\begin{Examples}
\begin{ExampleCode}
library(MASS)
data(Pima.tr)
pm = MLearn(type~., data=Pima.tr, "lda", 1:150 )
confuMatTrain(pm)  # on training data
confuMat(pm)  # on held-out test data
#
pm2 = MLearn(type~., data=Pima.tr, "logistic", 1:150, mlSpecials=
  list(thresh=.2) )
confuMat(pm2)
#
library(golubEsets)
data(Golub_Merge)
rp = MLearn(ALL.AML~., Golub_Merge[1:200,], "rpart", 1:35 )
confuMat(rp)
sv = MLearn(ALL.AML~., Golub_Merge[1:200,], "svm", 1:35 )
confuMat(sv)
confuMatTrain(sv)
# illustrate real adaboost
rab = MLearn(ALL.AML~., Golub_Merge[1:200,], "RAB", 1:35, 
   maxiter=20, maxdepth=2)
confuMatTrain(rab)
confuMat(rab)
# illustrate regularized discriminant analysis
rda = MLearn(ALL.AML~., Golub_Merge[1:2000,], "rdacv", 1:35 )
confuMatTrain(rda)
confuMat(rda)
\end{ExampleCode}
\end{Examples}

