fix tests
This commit is contained in:
parent
ab9d781b06
commit
cf882fa84e
@ -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)
|
||||||
|
@ -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,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user