fix tests

This commit is contained in:
robcaulk 2022-10-01 20:26:41 +02:00
parent ab9d781b06
commit cf882fa84e
3 changed files with 4 additions and 4 deletions

View File

@ -213,7 +213,7 @@ class BaseReinforcementLearningModel(IFreqaiModel):
dk.data_dictionary["prediction_features"] = filtered_dataframe dk.data_dictionary["prediction_features"] = filtered_dataframe
# optional additional data cleaning/analysis # optional additional data cleaning/analysis
self.data_cleaning_predict(dk, filtered_dataframe) self.data_cleaning_predict(dk)
pred_df = self.rl_model_predict( pred_df = self.rl_model_predict(
dk.data_dictionary["prediction_features"], dk, self.model) dk.data_dictionary["prediction_features"], dk, self.model)

View File

@ -71,7 +71,7 @@ def test_use_DBSCAN_to_remove_outliers(mocker, freqai_conf, caplog):
freqai = make_data_dictionary(mocker, freqai_conf) freqai = make_data_dictionary(mocker, freqai_conf)
# freqai_conf['freqai']['feature_parameters'].update({"outlier_protection_percentage": 1}) # freqai_conf['freqai']['feature_parameters'].update({"outlier_protection_percentage": 1})
freqai.dk.use_DBSCAN_to_remove_outliers(predict=False) freqai.dk.use_DBSCAN_to_remove_outliers(predict=False)
assert log_has_re(r"DBSCAN found eps of 2\.3\d\.", caplog) assert log_has_re(r"DBSCAN found eps of 1.75", caplog)
def test_compute_distances(mocker, freqai_conf): def test_compute_distances(mocker, freqai_conf):
@ -86,7 +86,7 @@ def test_use_SVM_to_remove_outliers_and_outlier_protection(mocker, freqai_conf,
freqai_conf['freqai']['feature_parameters'].update({"outlier_protection_percentage": 0.1}) freqai_conf['freqai']['feature_parameters'].update({"outlier_protection_percentage": 0.1})
freqai.dk.use_SVM_to_remove_outliers(predict=False) freqai.dk.use_SVM_to_remove_outliers(predict=False)
assert log_has_re( assert log_has_re(
"SVM detected 8.66%", "SVM detected 7.36%",
caplog, caplog,
) )