statsmodels.gam.generalized_additive_模型.GLMGam.选择_惩罚权重_k折¶
-
GLMGam.select_penweight_kfold(alphas=
None, cv_iterator=None, cost=None, k_folds=5, k_grid=11)[source]¶ 通过k折交叉验证找到alpha值
- Warning: This estimates
k_foldsmodels for each point in the alpha 的网格。
注释
默认的alphas定义为
alphas = [np.logspace(0, 7, k_grid) for _ in range(k_smooths)]- Warning: This estimates
Last update:
Oct 16, 2024