关于grid_search中param_grid可以选取哪些参数(以keras为例)
最近在学习调参时看到了 grid_search (也就是网格搜索算法)
https://cloud.tencent.com/developer/article/1447855
细节可以见上面这篇文章
官方原话解释是
param_griddict or list of dictionaries
Dictionary with parameters names (string) as keys and lists of parameter settings to try as values, or a list of such dictionaries, in which case the grids spanned by each dictionary in the list are explored. This enables searching over any sequence of parameter settings.
param_grid中传入参数列表
找遍了官方地址也没有看到,找了很多例子有使用kernel、batchsize、epochs、optimizer的,后来在看到一篇文章时发现 keras 官方地址给出了详细解释,英文原话如下
When using scikit-learn’s grid_search API, legal tunable parameters are those you could pass to sk_params, including fitting parameters. In other words, you could use grid_search to search for the best batch_size or epochs as well as the model parameters.
意思就是当你用grid_search时,可以使用的参数就是那些可以传入sk_params中的参数,而sk_params是什么呢
keras.wrappers.scikit_learn.KerasRegressor(build_fn=None, **sk_params)
sk_params
*sk_params takes both model parameters and fitting parameters. Legal model parameters are the arguments of build_fn. Note that lik