📄 varused
字号:
varUsed package:randomForest R Documentation
_V_a_r_i_a_b_l_e_s _u_s_e_d _i_n _a _r_a_n_d_o_m _f_o_r_e_s_t
_D_e_s_c_r_i_p_t_i_o_n:
Find out which predictor variables are actually used in the random
forest.
_U_s_a_g_e:
varUsed(x, by.tree=FALSE, count=TRUE)
_A_r_g_u_m_e_n_t_s:
x: An object of class 'randomForest'.
by.tree: Should the list of variables used be broken down by trees in
the forest?
count: Should the frequencies that variables appear in trees be
returned?
_V_a_l_u_e:
If 'count=TRUE' and {by.tree=FALSE}, a integer vector containing
frequencies that variables are used in the forest. If
'by.tree=TRUE', a matrix is returned, breaking down the counts by
tree (each column corresponding to one tree and each row to a
variable).
If 'count=FALSE' and 'by.tree=TRUE', a list of integer indices is
returned giving the variables used in the trees, else if
'by.tree=FALSE', a vector of integer indices giving the variables
used in the entire forest.
_A_u_t_h_o_r(_s):
Andy Liaw
_S_e_e _A_l_s_o:
'randomForest'
_E_x_a_m_p_l_e_s:
data(iris)
set.seed(17)
varUsed(randomForest(Species~., iris, ntree=100))
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -