From 7c850a4c2d688624977f8a00e13cf8e98111c1a4 Mon Sep 17 00:00:00 2001 From: longyu Date: Mon, 11 Jul 2022 22:53:35 +0200 Subject: [PATCH] test the score during the training in the multi model --- .../prediction_models/CatboostPredictionMultiModel.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/freqtrade/freqai/prediction_models/CatboostPredictionMultiModel.py b/freqtrade/freqai/prediction_models/CatboostPredictionMultiModel.py index c4d92d7bb..5861d9bf8 100644 --- a/freqtrade/freqai/prediction_models/CatboostPredictionMultiModel.py +++ b/freqtrade/freqai/prediction_models/CatboostPredictionMultiModel.py @@ -90,12 +90,14 @@ class CatboostPredictionMultiModel(IFreqaiModel): X = data_dictionary["train_features"] y = data_dictionary["train_labels"] - # eval_set = (data_dictionary["test_features"], data_dictionary["test_labels"]) + eval_set = (data_dictionary["test_features"], data_dictionary["test_labels"]) sample_weight = data_dictionary["train_weights"] model = MultiOutputRegressor(estimator=cbr) model.fit(X=X, y=y, sample_weight=sample_weight) # , eval_set=eval_set) - + train_score = model.score(X, y) + test_score = model.score(*eval_set) + logger.info(f"Train score {train_score}, Test score {test_score}") return model def predict(