⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 importance

📁 本程序是基于linux系统下c++代码
💻
字号:
importance           package:randomForest           R Documentation

_E_x_t_r_a_c_t _v_a_r_i_a_b_l_e _i_m_p_o_r_t_a_n_c_e _m_e_a_s_u_r_e

_D_e_s_c_r_i_p_t_i_o_n:

     This is the extractor function for variable importance measures as
     produced by 'randomForest'.

_U_s_a_g_e:

     ## S3 method for class 'randomForest':
     importance(x, type=NULL, class=NULL, scale=TRUE, ...)

_A_r_g_u_m_e_n_t_s:

       x: an object of class 'randomForest'

    type: either 1 or 2, specifying the type of importance measure
          (1=mean decrease in accuracy, 2=mean decrease in node
          impurity).

   class: for classification problem, which class-specific measure to
          return.

   scale: For permutation based measures, should the measures be
          divided their ``standard errors''?

     ...: not used.

_D_e_t_a_i_l_s:

     Here are the definitions of the variable importance measures.  For
     each tree, the prediction accuracy on the out-of-bag portion of
     the data is recorded.  Then the same is done after permuting each
     predictor variable.  The difference between the two accuracies are
     then averaged over all trees, and normalized by the standard
     error.  For regression, the MSE is computed on the out-of-bag data
     for each tree, and then the same computed after permuting a
     variable.  The differences are averaged and normalized by the
     standard error.  If the standard error is equal to 0 for a
     variable, the division is not done (but the measure is almost
     always equal to 0 in that case).

     The second measure is the total decrease in node impurities from
     splitting on the variable, averaged over all trees.  For
     classification, the node impurity is measured by the Gini index. 
     For regression, it is measured by residual sum of squares.

_V_a_l_u_e:

     A (named) vector of importance measure, one for each predictor
     variable.

_S_e_e _A_l_s_o:

     'randomForest', 'varImpPlot'

_E_x_a_m_p_l_e_s:

     set.seed(4543)
     data(mtcars)
     mtcars.rf <- randomForest(mpg ~ ., data=mtcars, ntree=1000, 
                               keep.forest=FALSE, importance=TRUE)
     importance(mtcars.rf)
     importance(mtcars.rf, type=1)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -