randomVarImpsRFplot(varSelRF)
randomVarImpsRFplot()所属R语言包:varSelRF
Plot random random variable importances
图随机随机变量的重要性
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Plot variable importances from random permutations of class labels and the variable importances from the original data set.
积可变的重要性从随机排列的类标签和从原始数据集的变量的重要性。
用法----------Usage----------
randomVarImpsRFplot(randomImportances, forest,
whichImp = "impsUnscaled", nvars = NULL,
show.var.names = FALSE, vars.highlight = NULL,
main = NULL, screeRandom = TRUE,
lwdBlack = 1.5,
lwdRed = 2,
lwdLightblue = 1,
cexPoint = 1,
overlayTrue = FALSE,
xlab = NULL,
ylab = NULL, ...)
参数----------Arguments----------
参数:randomImportances
A list with a structure such as the object return by randomVarImpsRF.
列表的结构,如对象返回randomVarImpsRF。
参数:forest
A random forest fitted to the original data. This forest must have been fitted with importances = TRUE.
甲嵌合到原始数据的随机森林。必须已经安装有importances = TRUE这片森林。
参数:whichImp
The importance measue to use. One (only 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.
利用的重要性measue。 (只有一个)的impsUnscaled,impsScaled,impsGini,相对应的,分别为(无标度)平均减少的精确度,准确性,规模平均减少和基尼系数。请参阅下面randomForest,importance和引用的措施作进一步的解释变量的重要性。
参数:nvars
If NULL will show the plot for the complete range of variables. If an integer, will plot only the most important nvars.
如果为NULL,将显示图的完整范围的变量。如果一个整数,将绘制最重要的nvars。
参数:show.var.names
If TRUE, show the variable names in the plot. Unless you are plotting few variables, it probably won't be of any use.
如果是TRUE,在图中显示的变量名。除非你正在策划的几个变量,它可能不会有任何使用。
参数:vars.highlight
A vector indicating the variables to highlight in the plot with a vertical blue segment. You need to pass here a vector of variable names, not variable positions.
一个向量表示的变量,突出一个垂直的蓝色部分的图。在这里,你需要通过一个向量的变量名,变量的位置。
参数:main
The title for the plot.
图的标题。
参数:screeRandom
If TRUE, order all the variable importances (i.e., those from both the original and the permuted class labels data sets) from largest to smallest before plotting. The plot will thus resemble a usual "scree plot".
如果是TRUE,命令所有的变量的重要性(例如,从原始的和置换类标签的数据集),从最大到最小,然后再绘制。因此,该图将类似于通常的“卵石的图”。
参数:lwdBlack
The width of the line to use for the importances from the original data set.
线的宽度,以用于从原始数据集的重要性。
参数:lwdRed
The width of the line to use for the average of the importances for the permuted data sets.
使用的线的宽度为平均置换后的数据集的重要性。
参数:lwdLightblue
The width of the line for the importances for the individual permuted data sets.
设置的线的宽度为个别的排列的数据的重要性。
参数:cexPoint
cex argument for the points for the importances from the original data set.
cex参数点从原始数据集的重要性。
参数:overlayTrue
If TRUE, the variable importance from the original data set will be plotted last, so you can see it even if buried in the middle of many gree lines; can be of help when the plot does not allow you to see the black line.
如果是TRUE,变量的重要性,从原始数据集将被绘制,所以你可以看到它,即使埋在许多格力线的中间,可以帮助的时候的图不会让你看到的黑线。
参数:xlab
The title for the x-axis (see xlab).
的x-轴的标题(见xlab)。
参数:ylab
The title for the y-axis (see ylab).
为y轴的标题(见ylab“)。
参数:...
Additional arguments to plot.
其他参数图。
值----------Value----------
Only used for its side effects of producing plots. In particular, you will see lines of three colors: <table summary="R valueblock"> <tr valign="top"><td>black</td> <td> Connects the variable importances from the original simulated data. </td></tr> <tr valign="top"><td>green</td> <td> Connect the variable importances from the data sets with permuted class labels; there will be as many lines as numrandom where used when randomVarImpsRF was called to obtain the random importances.</td></tr> <tr valign="top"><td>red</td> <td> Connects the average of the importances from the permuted data sets.</td></tr> </table> Additionally, if you used a valid set of values for vars.highlight, these will be shown with a vertical blue segment.
仅用于其生产图的副作用。特别是,你会看到三种颜色的线:<table summary="R valueblock"> <tr valign="top"> <TD>:black </ TD> <TD>连接的变量的重要性,从原来的模拟数据。 </ TD> </ TR> <tr valign="top"> <TD>green </ TD> <TD>连接置换类标签的数据集的变量的重要性,将有许多行numrandom在哪儿时所用的randomVarImpsRF被称为获得随机重要性,</ TD> </ TR> <tr valign="top"> <TD> red</ TD> <TD>的平均连接的重要性排列的数据集。</ TD> </ TR> </ TABLE>此外,如果你使用一组有效的值vars.highlight,这些将显示有垂直的蓝色部分。
注意----------Note----------
These plots resemble the scree plots commonly used with principal component analysis, and the actual choice of colors was taken from the
这些图类似卵石普遍使用的主成分分析图,与实际选择的颜色是从
(作者)----------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). J. Royal Statistical Society, Series B, 66, 815–850.
参见----------See Also----------
randomForest, varSelRF, varSelRFBoot, varSelImpSpecRF, randomVarImpsRF
randomForest,varSelRF,varSelRFBoot,varSelImpSpecRF,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)
randomVarImpsRFplot(rf.rvi, rf)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|