From: Jérôme Benoit Date: Wed, 5 Feb 2025 21:29:58 +0000 (+0100) Subject: fix(qav3): reset df index after concat X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=7970425431922641ff06b8d6d5bc360c6128ed15;p=freqai-strategies.git fix(qav3): reset df index after concat Signed-off-by: Jérôme Benoit --- diff --git a/quickadapter/user_data/freqaimodels/LightGBMRegressorQuickAdapterV35.py b/quickadapter/user_data/freqaimodels/LightGBMRegressorQuickAdapterV35.py index ff5dbcf..6ad5991 100644 --- a/quickadapter/user_data/freqaimodels/LightGBMRegressorQuickAdapterV35.py +++ b/quickadapter/user_data/freqaimodels/LightGBMRegressorQuickAdapterV35.py @@ -269,7 +269,8 @@ def objective( ) error = sklearn.metrics.root_mean_squared_error( - pd.concat([y_test_min, y_test_max]), pd.concat([y_pred_min, y_pred_max]) + pd.concat([y_test_min, y_test_max]).reset_index(drop=True), + pd.concat([y_pred_min, y_pred_max]).reset_index(drop=True), ) return error diff --git a/quickadapter/user_data/freqaimodels/XGBoostRegressorQuickAdapterV35.py b/quickadapter/user_data/freqaimodels/XGBoostRegressorQuickAdapterV35.py index 33188d8..992696b 100644 --- a/quickadapter/user_data/freqaimodels/XGBoostRegressorQuickAdapterV35.py +++ b/quickadapter/user_data/freqaimodels/XGBoostRegressorQuickAdapterV35.py @@ -274,7 +274,8 @@ def objective( ) error = sklearn.metrics.root_mean_squared_error( - pd.concat([y_test_min, y_test_max]), pd.concat([y_pred_min, y_pred_max]) + pd.concat([y_test_min, y_test_max]).reset_index(drop=True), + pd.concat([y_pred_min, y_pred_max]).reset_index(drop=True), ) return error