| prediction {CMA} | R Documentation |
This method constructs the given classifier using the specified training data, gene selection and tuning results.. Subsequently, class labels are predicted for new observations.
For S4 method information, s. classification-methods.
prediction(X.tr,y.tr,X.new,f,classifier,genesel,models=F,nbgene,tuneres,...)
X.tr |
Training gene expression data. Can be one of the following:
|
X.new |
gene expression data. Can be one of the following:
|
y.tr |
Class labels of training observation. Can be one of the following:
0 to K-1, where K is the
total number of different classes in the learning set.
|
f |
A two-sided formula, if X is a data.frame. The
left part correspond to class labels, the right to variables. |
genesel |
Optional (but usually recommended) object of class
genesel containing variable importance
information for the argument learningsets.
In this case the object contains a single variable selection. Appropriate
genesel-objects can be obtained using the function genesel
without learningset and setting X=X.tr and y=y.tr (i.e. corresponding to the training data of this function).
|
nbgene |
Number of best genes to be kept for classification, based
on either genesel or the call to GeneSelection
using genesellist. In the case that both are missing,
this argument is not necessary.
note:
|
classifier |
Name of function ending with CMA indicating
the classifier to be used. |
tuneres |
Analogous to the argument genesel - object of
class tuningresult containing information
about the best hyperparameter choice for the argument
learningsets. Appropriate tuning-objects can be obtained using the function
tune without learningsets and setting parameters X=X.tr, y=y.tr and genesel=genesel
(i.e. using the same training data and gene selection as in this function) |
models |
a logical value indicating whether the model object shall be returned |
... |
Further arguments passed to the function classifier. |
This function builds the specified classifier and predicts the class labels of new observations. Hence, its usage differs from those of most other prediction functions in R.
A object of class predoutput-class; Predicted classes can be seen by show(predoutput)
Christoph Bernau bernau@ibe.med.uni-muenchen.de
Anne-Laure Boulesteix boulesteix@ibe.med.uni-muenchen.de
Slawski, M. Daumer, M. Boulesteix, A.-L. (2008) CMA - A comprehensive Bioconductor package for supervised classification with high dimensional data. BMC Bioinformatics 9: 439
GeneSelection, tune, evaluation,
compBoostCMA, dldaCMA, ElasticNetCMA,
fdaCMA, flexdaCMA, gbmCMA,
knnCMA, ldaCMA, LassoCMA,
nnetCMA, pknnCMA, plrCMA,
pls_ldaCMA, pls_lrCMA, pls_rfCMA,
pnnCMA, qdaCMA, rfCMA,
scdaCMA, shrinkldaCMA, svmCMAclassification
### a simple k-nearest neighbour example
### datasets
## Not run: plot(x)
data(golub)
golubY <- golub[,1]
golubX <- as.matrix(golub[,-1])
###Splitting data into training and test set
X.tr<-golubX[1:30]
X.new<-golubX[31:39]
y.tr<-golubY[1:30]
### 1. GeneSelection
selttest <- GeneSelection(X=X.tr, y=y.tr, method = "t.test")
### 2. tuning
tunek <- tune(X.tr, y.tr, genesel = selttest, nbgene = 20, classifier = knnCMA)
### 3. classification
pred <- prediction(X.tr=X.tr,y.tr=y.tr,X.new=X.new, genesel = selttest,
tuneres = tunek, nbgene = 20, classifier = knnCMA)
### show and analyze results:
show(pred)
## End(Not run)