【发布时间】:2019-04-30 05:58:12
【问题描述】:
Q1:如何调整“classif.h2o.deeplearning”中的“隐藏”超参数?
我从 stackOverFlow 获得了不同的方法
makeDiscreteParam("hidden", values = list(one = 10, two = c(10, 5, 10)))
makeDiscreteParam(id = "hidden", values = list(a = c(10,10), b = c(20,20,20), c = c(30,30,30)))
makeDiscreteParam(id = "hidden", values = list(a = c(10,10), b = c(100,100)))
makeIntegerVectorParam("hidden", len = 2, lower = 10, upper = 100)
根据定义
hidden: Specifies the number and size of each hidden layer in the model. For example, if c(100,200,100) is specified, a model with 3 hidden layers is generated. The middle hidden layer will have 200 neurons and the first and third hidden layers will have 100 neurons each. The default is c(200,200). For grid search, use the following format: list(c(10,10), c(20,20)). Refer to the section on Performing a Trial Run for more details.
hidden 是“integervector”,所以我可以使用 makeIntegerVectorParam,我可以知道以下 2 种情况的语法吗(我在 getParamSet 中隐藏了 Def(200,200))
2 hidden layers and 30 neurons in each?
2 hidden layers with different neurons in each say 30,20?
Q2:如果我一次调5个参数需要很长时间,我应该在makeParamSet中逐个调优得到最优值,然后再将所有参数与makeParamSet中的具体值结合起来,这样的做法对吗?
关于 Q2:这可能不是一个正确的方法来逐个调整超参数然后组合,或者至少这是否给出了一个起点
Q3:我得到了 33 个用于 classif.h2o.deeplearning 的超参数,有没有办法选择合适的参数来调整?
【问题讨论】:
-
> 一个一个地调整超参数然后组合是正确的方法吗?不,超参数值在调整过程中相互依赖,结果会有所不同。
-
> 我得到了 33 个用于 classif.h2o.deeplearning 的超参数,有没有办法选择合适的参数来调整?不,您需要自己选择它们。算法应该使用哪些超标准并没有通用答案。