varSelImpSpecRF(varSelRF)
varSelImpSpecRF()所属R语言包:varSelRF
Variable selection using the "importance spectrum"
变量选择的“重要性谱”
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Perform variable selection based on a simple heuristic using the importance spectrum of the original data compared to the importance spectra from the same data with the class labels randomly permuted.
进行变量的选择的基础上使用一个简单的启发式相比到的重要性谱从相同的数据与随机置换类标签的原始数据的重要性频谱。
用法----------Usage----------
varSelImpSpecRF(forest, xdata = NULL, Class = NULL,
randomImps = NULL,
threshold = 0.1,
numrandom = 20,
whichImp = "impsUnscaled",
usingCluster = TRUE,
TheCluster = NULL, ...)
参数----------Arguments----------
参数:forest
A previously fitted random forest (see randomForest).
先前安装的随机森林(见randomForest“)。
参数:xdata
A data frame or matrix, with subjects/cases in rows and variables in columns. NAs not allowed.
一个数据框或矩阵的行和列中的变量,与科目/箱。来港定居不允许的。
参数:Class
The dependent variable; must be a factor.
因变量;必须是一个因素。
参数:randomImps
A list with a structure such as the object return by randomVarImpsRF.
列表的结构,如对象返回randomVarImpsRF。
参数:threshold
The threshold for the selection of variables. See details.
阈值变量的选择。查看详细信息。
参数:numrandom
The number of random permutations of the class labels.
类标签的随机排列的数量。
参数:whichImp
One of impsUnscaled, impsScaled, impsGini, that correspond, respectively, to the (unscaled) mean decrease in accuracy, the scaled mean decrease in accuracy, and the Gini index. See below and randomForest, importance and the references for further explanations of the measures of variable importance.
之一impsUnscaled,impsScaled,impsGini,对应,分别为(无标度)的意思的准确性,减少的比例平均下降的准确性,基尼系数。请参阅下面randomForest,importance和引用的措施作进一步的解释变量的重要性。
参数:usingCluster
If TRUE use a cluster to parallelize the calculations.
如果是TRUE,使用一个聚类并行计算。
参数:TheCluster
The name of the cluster, if one is used.
聚类的名称,如果使用了。
参数:...
Not used.
未使用。
Details
详细信息----------Details----------
You can either pass as arguments a valid object for randomImps, obtained from a previous call to randomVarImpsRF OR you can pass a covariate data frame and a dependent variable, and these will be used to obtain the random importances. The former is preferred for normal use, because this function will not returned the computed random variable importances, and this computation can be lengthy. If you pass both randomImps, xdata, and Class, randomImps will be used.
您可以作为参数传递一个有效的对象,randomImps,从以前的通话randomVarImpsRF你可以通过协的数据框和因变量,而这些将被用来获得随机的重要性。前者是优选的正常使用,因为这个函数将不返回所计算的随机变量的重要性,和这个计算可能需要很长时间。你通过两个randomImps,如果,xdata和Class,randomImps使用。
To select variables, start by ordering from largest (i=1) to smallest (i = p, where p is the number of variables), the variable importances from the original data and from each of the data sets with permuted class labels. (So the ordering is done in each data set independently). Compute q_i, the 1 - threshold quantile of the ordered variable importances from the permuted data at ordered postion i. Then, starting from i = 1, let i_a be the first i for which the variable importance from the original data is smaller than q_i. Select all variables from i=1 to i = i_a - 1.
选择变量,开始订购(i=1)从最大到最小(i = p,其中p是变量数),从原始数据和每个变量的重要性数据集的置换类的标签。 (这样的顺序进行单独设置每个数据)。计算q_i,1 - threshold位数的有序变量的重要性排列的数据责令现在的位置i。然后,开始从i = 1,让i_a是第一个i从原始数据中的变量重要性小于q_i。从i=1到i = i_a - 1选择所有的变量。
值----------Value----------
A vector with the names of the selected variables, ordered by
一个向量,其所选变量的名称,下令
注意----------Note----------
The name of this function is related to the idea of "importance spectrum plot",
有关该功能的名称“的重要性频谱图”的想法,
(作者)----------Author(s)----------
Ramon Diaz-Uriarte <a href="mailto:rdiaz02@gmail.com">rdiaz02@gmail.com</a>
参考文献----------References----------
Breiman, L. (2001) Random forests. Machine Learning, 45, 5–32.
Diaz-Uriarte, R. , Alvarez de Andres, S. (2005) Variable selection from random forests: application to gene expression data. Tech. report. http://ligarto.org/rdiaz/Papers/rfVS/randomForestVarSel.html
Friedman, J., Meulman, J. (2005) Clustering objects on subsets of attributes (with discussion).
参见----------See Also----------
randomForest, varSelRF, varSelRFBoot, randomVarImpsRFplot, randomVarImpsRF
randomForest,varSelRF,varSelRFBoot,randomVarImpsRFplot,randomVarImpsRF
实例----------Examples----------
x <- matrix(rnorm(45 * 30), ncol = 30)
x[1:20, 1:2] <- x[1:20, 1:2] + 2
cl <- factor(c(rep("A", 20), rep("B", 25)))
rf <- randomForest(x, cl, ntree = 200, importance = TRUE)
rf.rvi <- randomVarImpsRF(x, cl,
rf,
numrandom = 20,
usingCluster = FALSE)
varSelImpSpecRF(rf, randomImps = rf.rvi)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|