关于grid_search中param_grid可以选取哪些参数(以keras为例)

关于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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值