set class names attribute in the general classifier testing strategy

This commit is contained in:
Yinon Polak 2023-03-18 14:12:31 +02:00
parent 366740885a
commit 244662b1a4

View File

@ -82,7 +82,7 @@ class freqai_test_classifier(IStrategy):
return dataframe return dataframe
def set_freqai_targets(self, dataframe: DataFrame, metadata: Dict, **kwargs): def set_freqai_targets(self, dataframe: DataFrame, metadata: Dict, **kwargs):
self.freqai.class_names = ["down", "up"]
dataframe['&s-up_or_down'] = np.where(dataframe["close"].shift(-100) > dataframe['&s-up_or_down'] = np.where(dataframe["close"].shift(-100) >
dataframe["close"], 'up', 'down') dataframe["close"], 'up', 'down')