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

📄 na.roughfix

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

_R_o_u_g_h _I_m_p_u_t_a_t_i_o_n _o_f _M_i_s_s_i_n_g _V_a_l_u_e_s

_D_e_s_c_r_i_p_t_i_o_n:

     Impute Missing Values by median/mode.

_U_s_a_g_e:

     na.roughfix(object, ...)

_A_r_g_u_m_e_n_t_s:

  object: a data frame or numeric matrix.

     ...: further arguments special methods could require.

_V_a_l_u_e:

     A completed data matrix or data frame.  For numeric variables,
     'NA's are replaced with column medians.  For factor variables,
     'NA's are replaced with the most frequent levels (breaking ties at
     random).  If 'object' contains no 'NA's, it is returned unaltered.

_N_o_t_e:

     This is used as a starting point for imputing missing values by
     random forest.

_A_u_t_h_o_r(_s):

     Andy Liaw

_S_e_e _A_l_s_o:

     'rfImpute', 'randomForest'.

_E_x_a_m_p_l_e_s:

     data(iris)
     iris.na <- iris
     set.seed(111)
     ## artificially drop some data values.
     for (i in 1:4) iris.na[sample(150, sample(20)), i] <- NA
     iris.roughfix <- na.roughfix(iris.na)
     iris.narf <- randomForest(Species ~ ., iris.na, na.action=na.roughfix)
     print(iris.narf)

⌨️ 快捷键说明

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