classification(CMA)
classification()所属R语言包:CMA
General method for classification with various methods
用各种方法分类的一般方法
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Most general function in the package, providing an interface to perform variable selection, hyperparameter tuning and classification in one step. Alternatively, the first two steps can be performed separately and can then be plugged into this function.<br> For S4 method information, s. classification-methods.
最普遍的功能包,提供了一个接口来执行在一个步骤中的变量选择,hyperparameter调整和分类。另外,前两个步骤可以单独执行,然后就可以插入到这个功能。对于S4方法信息的参考。 classification-methods。
用法----------Usage----------
classification(X, y, f, learningsets, genesel, genesellist = list(), nbgene, classifier, tuneres, tuninglist = list(), trace = TRUE, models=FALSE,...)
参数----------Arguments----------
参数:X
Gene expression data. Can be one of the following:
基因表达数据。可以是下列之一:
A matrix. Rows correspond to observations, columns to variables.
Amatrix。行对应的观察,列变量。
A data.frame, when f is not missing (s. below).
一个data.frame时f不缺少(S.下面)。
An object of class ExpressionSet.
对象类ExpressionSet。
参数:y
Class labels. Can be one of the following:
类的标签。可以是下列之一:
A numeric vector.
一个numeric向量。
A factor.
Afactor。
A character if X is an ExpressionSet that specifies the phenotype variable.
一个如果character X是一个ExpressionSet指定的表型变量。
missing, if X is a data.frame and a proper formula f is provided.
missing,X是data.frame和适当的公式f提供。
WARNING: The class labels will be re-coded to range from 0 to K-1, where K is the total number of different classes in the learning set.
警告:类标签将被重新编码范围从0K-1,K是在学习集不同类别的总数。
参数:f
A two-sided formula, if X is a data.frame. The left part correspond to class labels, the right to variables.
一个双面的公式,如果X是data.frame。左边部分对应类的标签,对变量的权利。
参数:learningsets
An object of class learningsets. May be missing, then the complete datasets is used as learning set.
对象类learningsets。可能会丢失,然后学习一套完整的数据集。
参数:genesel
Optional (but usually recommended) object of class genesel containing variable importance information for the argument learningsets
可选(但通常推荐)对象类genesel含参数learningsets变量的重要性的信息
参数:genesellist
In the case that the argument genesel is missing, this is an argument list passed to GeneSelection. If both genesel and genesellist are missing, no variable selection is performed.
参数genesel是失踪的情况下,这是一个参数列表传递到GeneSelection。如果这两个genesel和genesellist缺少,没有变量选择执行。
参数: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:
最好的基因数目要保持分类的基础上,要么genesel或GeneSelection用genesellist。都缺少的情况下,这种说法是没有必要的。注意:
If the gene selection method has been one of "lasso", "elasticnet", "boosting", nbgene will be reset to min(s, nbgene) where s is the number of nonzero coefficients.
如果基因选择方法之一"lasso", "elasticnet", "boosting",nbgene将重置min(s, nbgene)其中s是非零系数的数目。
if the gene selection scheme has been "one-vs-all", "pairwise" for the multiclass case, there exist several rankings. The top nbgene will be kept of each of them, so the number of effective used genes will sometimes be much larger.
如果基因选择方案一直"one-vs-all", "pairwise"为多的情况下,存在着几个排名。顶部nbgene将保持他们每个人的,所以有效使用基因的数量有时会大得多。
参数:classifier
Name of function ending with CMA indicating the classifier to be used.
CMA指示要使用的分类函数名结束。
参数:tuneres
Analogous to the argument genesel - object of class tuningresult containing information about the best hyperparameter choice for the argument learningsets.
类似的说法genesel - 类tuningresult包含有关为参数learningsets最好hyperparameter的选择的信息的对象。
参数:tuninglist
Analogous to the argument genesellist. In the case that the argument tuneres is missing, this in argument list passed to tune. If both tuneres and tuninglist are missing, no variable selection is performed. warning: Note that if a user-defined hyperparameter grid is passed, this will result in a list within a list: tuninglist = list(grids=list(argname = c()), s. example. warning: Contrary to tune, if tuninglist is an empty list (default), no hyperparameter tuning will be performed at all. To use pre-defined hyperparameter grids, the argument is tuninglist = list(grids = list()).
类似于参数genesellist。参数tuneres是失踪的情况下,这个参数列表传递给tune。如果这两个tuneres和tuninglist缺少,没有变量选择执行。警告:请注意,如果一个用户定义的hyperparameter电网获得通过,这将导致在一个列表的列表:tuninglist = list(grids=list(argname = c()),S。例子。警告:tune相反,如果tuninglist是一个空列表(默认),没有hyperparameter调整将在所有执行。使用前的定义hyperparameter电网,参数是tuninglist = list(grids = list())。
参数:trace
Should progress be traced ? Default is TRUE.
应该进步被追踪吗?默认TRUE。
参数:models
a logical value indicating whether the model object shall be returned
一个逻辑值,该值指示是否应归还模型对象
参数:...
Further arguments passed to the function classifier.
进一步的参数传递给函数classifier。
Details
详情----------Details----------
For details about hyperparameter tuning, consult tune.
有关hyperparameter调整的细节,请咨询tune。
值----------Value----------
A list of objects of class cloutput and clvarseloutput, respectively; its length equals the number of different learningsets. The single elements of the list can convenienly be combined using the join function. The results can be analyzed and
一类对象cloutput和clvarseloutput,分别列表,其长度等于不同learningsets。列表中的单个元素,可以convenienly结合使用join功能。可以分析的结果和
作者(S)----------Author(s)----------
Martin Slawski <a href="mailto:ms@cs.uni-sb.de">ms@cs.uni-sb.de</a>
Anne-Laure Boulesteix <a href="mailto:boulesteix@ibe.med.uni-muenchen.de">boulesteix@ibe.med.uni-muenchen.de</a>
Christoph Bernau <a href="mailto:bernau@ibe.med.uni-muenchen.de">bernau@ibe.med.uni-muenchen.de</a>
参考文献----------References----------
CMA - A comprehensive Bioconductor package for supervised classification with high dimensional data.
参见----------See Also----------
GeneSelection, tune, evaluation, compBoostCMA, dldaCMA, ElasticNetCMA, fdaCMA, flexdaCMA, gbmCMA, knnCMA, ldaCMA, LassoCMA, nnetCMA, pknnCMA, plrCMA, pls_ldaCMA, pls_lrCMA, pls_rfCMA, pnnCMA, qdaCMA, rfCMA,
GeneSelection,tune,evaluation,compBoostCMA,dldaCMA,ElasticNetCMA,fdaCMA,flexdaCMA,gbmCMA,knnCMA,ldaCMA,LassoCMA,nnetCMA,pknnCMA,plrCMA,pls_ldaCMA,pls_lrCMA ,pls_rfCMA,pnnCMA,qdaCMA,rfCMA
举例----------Examples----------
### a simple k-nearest neighbour example[#一个简单的k-近邻例如]
### datasets[##集]
## Not run: plot(x)[#不运行:图(X)]
data(golub)
golubY <- golub[,1]
golubX <- as.matrix(golub[,-1])
### learningsets[##learningsets]
set.seed(111)
lset <- GenerateLearningsets(y=golubY, method = "CV", fold=5, strat =TRUE)
### 1. GeneSelection[##1。 GeneSelection]
selttest <- GeneSelection(golubX, golubY, learningsets = lset, method = "t.test")
### 2. tuning[##2。调音]
tunek <- tune(golubX, golubY, learningsets = lset, genesel = selttest, nbgene = 20, classifier = knnCMA)
### 3. classification[##3。分类]
knn1 <- classification(golubX, golubY, learningsets = lset, genesel = selttest,
tuneres = tunek, nbgene = 20, classifier = knnCMA)
### steps 1.-3. combined into one step:[#步骤1.-3。合并成一个步骤:]
knn2 <- classification(golubX, golubY, learningsets = lset,
genesellist = list(method = "t.test"), classifier = knnCMA,
tuninglist = list(grids = list(k = c(1:8))), nbgene = 20)
### show and analyze results:[#显示和分析结果:]
knnjoin <- join(knn2)
show(knn2)
eval <- evaluation(knn2, measure = "misclassification")
show(eval)
summary(eval)
boxplot(eval)
## End(Not run)[#结束(不运行)]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|