[英]BayesSearchCV of LGBMregressor: how to weight samples in both training and CV scoring?
While optimizing LightGBM hyperparameters, I'd like to individually weight samples during both training and CV scoring.在优化 LightGBM 超参数时,我想在训练和 CV 评分期间分别对样本进行加权。 From the BayesSearchCV docs , it seems that a way to do that could be to insert a LGBMregressor sample_weight
key into the BayesSearchCV fit_params
option.从BayesSearchCV docs看来,一种方法可能是将LGBMregressor sample_weight
键插入 BayesSearchCV fit_params
选项。 But this is not clear because both BayesSearchCV and LGBMregressor have fit
methods.但这并不清楚,因为 BayesSearchCV 和 LGBMregressor 都有fit
方法。
To which fit
method is the BayesSearchCV fit_params
going? BayesSearchCV fit_params
哪种fit
方法? And is using fit_params
really the way to weight samples during both training and CV scoring?在训练和 CV 评分期间,使用fit_params
真的是对样本进行加权的方法吗?
Based on the documentation I believe fit_params
is passed as an argument upon BayesSearchCV() instantiation, not when the.fit() method is called.根据文档,我相信fit_params
在 BayesSearchCV() 实例化时作为参数传递,而不是在调用 .fit() 方法时传递。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.