FIX ISSUES
This commit is contained in:
@@ -1084,23 +1084,23 @@ class Zeus_8_3_2_B_4_2(IStrategy):
|
||||
|
||||
dataframe['stop_buying'] = latched
|
||||
|
||||
if self.dp.runmode.value in ('backtest'):
|
||||
if False and self.dp.runmode.value in ('backtest'):
|
||||
self.trainModel(dataframe, metadata)
|
||||
|
||||
short_pair = self.getShortName(pair)
|
||||
if short_pair == 'BTC':
|
||||
self.model = joblib.load(f"{short_pair}_rf_model.pkl")
|
||||
|
||||
# Préparer les features pour la prédiction
|
||||
features = dataframe[self.model_indicators].fillna(0)
|
||||
|
||||
# Prédiction : probabilité que le prix monte
|
||||
probs = self.model.predict_proba(features)[:, 1]
|
||||
|
||||
# Sauvegarder la probabilité pour l’analyse
|
||||
dataframe['ml_prob'] = probs
|
||||
|
||||
self.inspect_model(self.model)
|
||||
# if short_pair == 'BTC':
|
||||
# self.model = joblib.load(f"{short_pair}_rf_model.pkl")
|
||||
#
|
||||
# # Préparer les features pour la prédiction
|
||||
# features = dataframe[self.model_indicators].fillna(0)
|
||||
#
|
||||
# # Prédiction : probabilité que le prix monte
|
||||
# probs = self.model.predict_proba(features)[:, 1]
|
||||
#
|
||||
# # Sauvegarder la probabilité pour l’analyse
|
||||
# dataframe['ml_prob'] = probs
|
||||
#
|
||||
# self.inspect_model(self.model)
|
||||
|
||||
return dataframe
|
||||
|
||||
|
||||
Reference in New Issue
Block a user