from freqtrade.freqai.tensorboard.TensorboardCallback import TensorboardCallback
from freqtrade.strategy import timeframe_to_minutes
-
matplotlib.use("Agg")
warnings.filterwarnings("ignore", category=UserWarning)
warnings.filterwarnings("ignore", category=FutureWarning)
calculate_min_extrema,
calculate_n_extrema,
fit_regressor,
- get_callbacks,
+ get_optuna_callbacks,
get_optuna_study_model_parameters,
largest_divisor,
round_to_nearest_int,
eval_set=[(X_test, y_test)],
eval_weights=[test_weights],
model_training_parameters=model_training_parameters,
- callbacks=get_callbacks(trial, regressor),
+ callbacks=get_optuna_callbacks(trial, regressor),
)
y_pred = model.predict(X_test)
eval_set=[(X_test, y_test)],
eval_weights=[test_weights],
model_training_parameters=model_training_parameters,
- callbacks=get_callbacks(trial, regressor),
+ callbacks=get_optuna_callbacks(trial, regressor),
)
y_pred = model.predict(X_test)
from technical import qtpylib
-
T = TypeVar("T", pd.Series, float)
regressors = {"xgboost", "lightgbm"}
-def get_callbacks(trial: optuna.trial.Trial, regressor: str) -> list[Callable]:
+def get_optuna_callbacks(trial: optuna.trial.Trial, regressor: str) -> list[Callable]:
if regressor == "xgboost":
callbacks = [
optuna.integration.XGBoostPruningCallback(trial, "validation_0-rmse")