optuna_search._check_is_fitted()
if fit_params == "sample_weight":
sample_weight = np.ones_like(y)
optuna_search.fit(X, y, sample_weight=sample_weight)
else:
optuna_search.fit(X, y)
After Change
optuna_search._check_is_fitted()
if fit_params == "coef_init" and not enable_pruning:
optuna_search.fit(X, y, coef_init=np.ones((3, 2), dtype=np.float64))
else:
optuna_search.fit(X, y)