From ea7bdac9edc7b3f5c5e039e509b8d368f7045a3e Mon Sep 17 00:00:00 2001 From: robcaulk Date: Wed, 7 Sep 2022 18:45:16 +0200 Subject: [PATCH] ensure inlier metric can be combined with other cleaning methods --- freqtrade/freqai/freqai_interface.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/freqtrade/freqai/freqai_interface.py b/freqtrade/freqai/freqai_interface.py index 5ccc9d1b2..32e42e115 100644 --- a/freqtrade/freqai/freqai_interface.py +++ b/freqtrade/freqai/freqai_interface.py @@ -427,6 +427,11 @@ class IFreqaiModel(ABC): ft_params = self.freqai_info["feature_parameters"] + if ft_params.get('inlier_metric_window', 0): + dk.compute_inlier_metric(set_='train') + if self.freqai_info["data_split_parameters"]["test_size"] > 0: + dk.compute_inlier_metric(set_='test') + if ft_params.get( "principal_component_analysis", False ): @@ -446,11 +451,6 @@ class IFreqaiModel(ABC): dk.use_DBSCAN_to_remove_outliers(predict=False, eps=eps) self.dd.old_DBSCAN_eps[dk.pair] = dk.data['DBSCAN_eps'] - if ft_params.get('inlier_metric_window', 0): - dk.compute_inlier_metric(set_='train') - if self.freqai_info["data_split_parameters"]["test_size"] > 0: - dk.compute_inlier_metric(set_='test') - if self.freqai_info["feature_parameters"].get('noise_standard_deviation', 0): dk.add_noise_to_training_features()