使用公式界面时有问题的随机森林训练运行时

ita*_*arb 8 performance r machine-learning formula

http://www.kaggle.com/c/icdar2013-gender-prediction-from-handwriting/data运行Random Forest示例,如下所示:

forest_model <- randomForest(as.factor(male) ~ ., data=train, ntree=10000)
Run Code Online (Sandbox Code Playgroud)

需要几个小时(不确定它是否会结束,但过程似乎确实有效).

数据集有1128行和~7000个变量.

是否有可能估计随机森林培训何时结束?我能以某种方式介绍R以获取更多信息吗?

ita*_*arb 11

发现问题,在randomForest中使用公式已经造成了巨大的性能下降.

有关此问题的更多信息以及如何估算随机森林运行时间,请访问: https ://stats.stackexchange.com/questions/37370/random-forest-computing-time-in-r以及http://www.gregorypark.组织/ p = 286

这是最终代码:

forest_model <- randomForest(y=train$male, x=train[,-2], ntree=10000,do.trace=T)
Run Code Online (Sandbox Code Playgroud)


ags*_*udy 7

控制收敛的一个想法是使用do.tracefor verbose模式

iris.rf <- randomForest(Species ~ ., data=iris, importance=TRUE,
+                         proximity=TRUE,do.trace=TRUE)
ntree      OOB      1      2      3
    1:   8.62%  0.00%  9.52% 15.00%
    2:   5.49%  0.00%  3.45% 13.79%
    3:   5.45%  0.00%  5.41% 11.76%
    4:   4.72%  0.00%  4.88%  9.30%
    5:   5.11%  0.00%  6.52%  8.89%
    6:   5.56%  2.08%  6.25%  8.33%
    7:   4.76%  0.00%  6.12%  8.16%
    8:   5.41%  0.00%  8.16%  8.16%
 .......
Run Code Online (Sandbox Code Playgroud)