From: Jérôme Benoit Date: Sun, 28 Dec 2025 01:34:12 +0000 (+0100) Subject: refactor(quickadapter): ensure 1D target with HistGradientBoostingRegressor X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=f070f627229bc61da7c02982538f0ede669da1ca;p=freqai-strategies.git refactor(quickadapter): ensure 1D target with HistGradientBoostingRegressor Signed-off-by: Jérôme Benoit --- diff --git a/quickadapter/user_data/strategies/Utils.py b/quickadapter/user_data/strategies/Utils.py index 8a53372..4364ee3 100644 --- a/quickadapter/user_data/strategies/Utils.py +++ b/quickadapter/user_data/strategies/Utils.py @@ -2058,6 +2058,7 @@ def fit_regressor( y_val = None if eval_set is not None and len(eval_set) > 0: X_val, y_val = eval_set[0] + y_val = y_val.to_numpy().ravel() sample_weight_val = None if eval_weights is not None and len(eval_weights) > 0: @@ -2071,7 +2072,7 @@ def fit_regressor( model.fit( X=X, - y=y, + y=y.to_numpy().ravel(), sample_weight=train_weights, X_val=X_val, y_val=y_val,