\HeaderA{classifyLDA}{Function to do discrimination analysis}{classifyLDA}
\keyword{methods}{classifyLDA}
\begin{Description}\relax
Function to search by groups of few genes, also called cliques, that
can discriminate (or classify) between two distinct biological
sample types, using the Fisher's linear discriminat analysis. This
function uses exhaustive search.
\end{Description}
\begin{Usage}
\begin{verbatim}
classifyLDA(obj=NULL, sLabelID="Classification", facToClass=NULL,
            gNameID="GeneName", geneGrp=1, path=NULL, nGenes=3,
            sortBy="cv")
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{obj}] object of class \code{\LinkA{maiges}{maiges}} to search the classifiers.
\item[\code{sLabelID}] character string with the identification of the sample
label to be used.
\item[\code{facToClass}] named list with 2 character vectors specifying the
samples to be compared. If NULL (default) the first 2 types of
sLabelID are used.
\item[\code{gNameID}] character string with the identification of gene label ID.
\item[\code{geneGrp}] character or integer specifying the gene group to be
tested (\code{colnames} of \code{GeneGrps} slot). If both \code{geneGrp} and
\code{path} are NULL all genes are used. Defaults to 1 (first group).
\item[\code{path}] character or integer specifying the gene network to be
tested (\code{names} of \code{Paths} slot). If both \code{geneGrp}
and \code{path} are NULL all genes are used. Defaults to NULL.
\item[\code{nGenes}] integer specifying the number of genes in the clique, or
classifier.
\item[\code{sortBy}] character string with field to sort the result. May
be 'cv' (default) or 'svd' for cross validation by leave-one-out or
the singular value decomposition, respectively.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
Pay attention with the arguments \code{geneGrp} and \code{path}, if
both of them is NULL an exhaustive search for all dataset will be done,
and this search may be extremely computational intensive, which may
result in a process running during some weeks or months depending on the
number of genes in your dataset.

If you want to construct classifiers from a group of several genes,
the \emph{search and choose} (SC) method may be an interesting option. It is
implemented in the function \code{\LinkA{classifyLDAsc}{classifyLDAsc}}.
This function uses the function \code{\LinkA{lda}{lda}} from package
\emph{MASS} to search by classifiers using Fisher's linear
discriminant analysis. The functions \code{\LinkA{classifySVM}{classifySVM}} and
\code{\LinkA{classifyKNN}{classifyKNN}} were also dedined to construct classifiers
by support vector machines ans k-neighbours, respectively.
\end{Details}
\begin{Value}
The result of this function is an object of class \code{\LinkA{maigesClass}{maigesClass}}.
\end{Value}
\begin{Author}\relax
Elier B. Cristo, adapted by Gustavo H. Esteves <\email{gesteves@vision.ime.usp.br}>
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{lda}{lda}}, \code{\LinkA{classifySVM}{classifySVM}},
\code{\LinkA{classifyKNN}{classifyKNN}}, \code{\LinkA{classifyLDAsc}{classifyLDAsc}}.
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
## Loading the dataset
data(gastro)

## Doing LDA classifier with 2 genes for the 6th gene group comparing
## the 2 categories from 'Type' sample label.
gastro.class = classifyLDA(gastro.summ, sLabelID="Type",
  gNameID="GeneName", nGenes=2, geneGrp=6)
gastro.class

## To do classifier with 3 genes for the 6th gene group comparing
## normal vs adenocarcinomas from 'Tissue' sample label
gastro.class = classifyLDA(gastro.summ, sLabelID="Tissue",
  gNameID="GeneName", nGenes=3, geneGrp=6,
  facToClass=list(Norm=c("Neso","Nest"), Ade=c("Aeso","Aest")))
\end{ExampleCode}
\end{Examples}

