【问题标题】:R: Efficient Approach for Random Forest tuning of hyper parametersR:随机森林调整超参数的有效方法
【发布时间】:2021-03-23 06:02:31
【问题描述】:

我有以下具有默认参数的随机森林(回归)模型

set.seed(42)

# Define train control
trControl <- trainControl(method = "cv",
    number = 10,
    search = "grid")

# Random Forest (regression) model
rf_reg <- train(Price.Gas~., data=data_train,
                    method = "rf",
                    metric = "RMSE",
                    trControl = trControl)

这是真实值(黑色)和预测值(红色)的输出图

我希望模型通过更改其调整参数(例如 ntree、maxnodes、搜索等)来表现更好。

我不认为一一改变是最有效的方法。

如何有效地测试 R 中的参数以获得更好的随机森林(即能够很好地预测数据的随机森林)?

【问题讨论】:

    标签: r machine-learning random-forest decision-tree grid-search


    【解决方案1】:

    您将执行某种超参数搜索(网格或随机),在其中列出要测试的所有值(或序列),然后计算所有值以获得最佳配置。此链接解释了插入符号的可能方法:https://rpubs.com/phamdinhkhanh/389752

    【讨论】:

      猜你喜欢
      • 2019-05-01
      • 2016-05-11
      • 2018-03-11
      • 2021-11-27
      • 2020-07-03
      • 1970-01-01
      • 2018-03-05
      • 2017-09-21
      • 1970-01-01
      相关资源
      最近更新 更多