diff --git a/config_examples/dryrun_XGBoostRegressorMultiTarget.json b/config_examples/dryrun_XGBoostRegressorMultiTarget.json index 91089ba9..3771353a 100644 --- a/config_examples/dryrun_XGBoostRegressorMultiTarget.json +++ b/config_examples/dryrun_XGBoostRegressorMultiTarget.json @@ -71,64 +71,76 @@ "use_order_book": false }, "freqai": { - "enabled": true, - "data_kitchen": { - "fillna": "ffill" - }, - "freqaimodel": "XGBoostRegressorMultiTarget", - "purge_old_models": 2, - "identifier": "dryrun-freqai", - "train_period_days": 18, - "backtest_period_days": 2, - "live_retrain_hours": 2, - "outlier_detection": { - "method": "IsolationForest", - "contamination": 0.15 // 适度提高异常值检测阈值,过滤更多噪声 - }, - "feature_selection": { - "method": "recursive_elimination", - "feature_number": 20 // 限制特征数量,避免维度爆炸导致过拟合 - }, - "feature_parameters": { - "include_timeframes": [ - "1m", - "15m", - "1h", - "4h" - ], - "include_corr_pairlist": [ - "XAUT/USDT", - "BTC/USDT" - ], - "outlier_protection_percentage": 0.1, - "label_period_candles": 100, - "include_shifted_candles": 2, // 减少移位蜡烛数,降低特征冗余 - "DI_threshold": 0.5, - "weight_factor": 0.9, - "principal_component_analysis": true, // 开启PCA降维,减少特征维度 - "use_SVM_to_remove_outliers": true, - "indicator_periods_candles": [ - 10, - 20, - 50 // 减少指标周期数,避免特征过多 - ], - "plot_feature_importances": 10 - }, - "data_split_parameters": { - "test_size": 0.2, // 增大测试集比例,更严格验证模型泛化能力 - "shuffle": false - }, - "model_training_parameters": { - "n_estimators": 200, // 减少树的数量,降低模型复杂度 - "learning_rate": 0.05, // 适度提高学习率,加快收敛且避免过拟合 - "max_depth": 5, // 降低树深度,核心缓解过拟合 - "min_child_weight": 3, // 提高子节点最小权重,避免拟合噪声 - "subsample": 0.7, // 降低样本采样率,增强正则化 - "colsample_bytree": 0.7, // 降低特征采样率,避免过拟合 - "verbosity": 0, - "reg_alpha": 0.1, // 新增L1正则化,限制权重 - "reg_lambda": 1.0 // 新增L2正则化,核心缓解过拟合 - } + "enabled": true, + "data_kitchen": { + "fillna": "ffill" + }, + "freqaimodel": "XGBoostRegressorMultiTarget", + "purge_old_models": 2, + "train_period_days": 14, + "backtest_period_days": 2, + "live_retrain_hours": 2, + "outlier_detection": { + "method": "IsolationForest", + "contamination": 0.2 + }, + "feature_selection": { + "method": "recursive_elimination", + "feature_number": 15 + }, + "feature_parameters": { + "include_timeframes": [ + "3m", + "15m", + "1h", + "4h" + ], + "include_corr_pairlist": [ + "XAUT/USDT", + ], + "outlier_protection_percentage": 0.2, + "label_period_candles": 100, + "include_shifted_candles": 2, + "DI_threshold": 0.5, + "weight_factor": 0.7, + "principal_component_analysis": true, + "n_components": 0.85, + "use_SVM_to_remove_outliers": true, + "indicator_periods_candles": [ + 10, + 20, + 50 + ], + "plot_feature_importances": 10, + "shuffle_after_split": false, + "buffer_train_data_candles": 0, + "smooth_features": true, + "smooth_window": 5 + }, + "data_split_parameters": { + "test_size": 0.25, + "shuffle": false + }, + "model_training_parameters": { + "n_estimators": 150, + "learning_rate": 0.025, + "max_depth": 4, + "min_child_weight": 5, + "subsample": 0.6, + "colsample_bytree": 0.6, + "reg_alpha": 0.5, + "reg_lambda": 2.0, + "verbosity": 0 + }, + "identifier": "live-freqai", + "write_metrics_to_disk": false, + "conv_width": 1, + "expiration_hours": 0, + "save_backtest_models": false, + "activate_tensorboard": true, + "wait_for_training_iteration_on_reload": true, + "continual_learning": false, + "keras": false }, "fee": 0.0008, "api_server": { diff --git a/config_examples/freqaiprimer.json b/config_examples/freqaiprimer.json index 4e5ed5da..3b23b290 100644 --- a/config_examples/freqaiprimer.json +++ b/config_examples/freqaiprimer.json @@ -68,86 +68,78 @@ "method": "StaticPairList" } ], - "freqai": { - "enabled": true, - "data_kitchen": { - "fillna": "ffill" - }, - "freqaimodel": "XGBoostRegressorMultiTarget", - "purge_old_models": 2, - "train_period_days": 14, - "backtest_period_days": 2, - "live_retrain_hours": 2, - "outlier_detection": { - "method": "IsolationForest", - "contamination": 0.2 - }, - "feature_selection": { - "method": "recursive_elimination", - "feature_number": 15 - }, - "feature_parameters": { - "include_timeframes": [ - "3m", - "15m", - "1h", - "4h" - ], - "include_corr_pairlist": [ - "XAUT/USDT", - ], - "outlier_protection_percentage": 0.2, - "label_period_candles": 100, - "include_shifted_candles": 2, - "DI_threshold": 0.5, - "weight_factor": 0.7, - "principal_component_analysis": true, - "n_components": 0.85, - "use_SVM_to_remove_outliers": true, - "indicator_periods_candles": [ - 10, - 20, - 50 - ], - "plot_feature_importances": 10, - "shuffle_after_split": false, - "buffer_train_data_candles": 0, - "smooth_features": true, - "smooth_window": 5 - }, - "data_split_parameters": { - "test_size": 0.25, - "shuffle": false - }, - "model_training_parameters": { - "n_estimators": 200, - "learning_rate": 0.03, - "num_leaves": 60, - "max_depth": 4, - "min_data_in_leaf": 20, - "feature_fraction": 0.7, - "bagging_fraction": 0.7, - "bagging_freq": 5, - "verbose": -1, - "min_child_weight": 6, - "subsample": 0.6, - "colsample_bytree": 0.6, - "verbosity": 0, - "reg_alpha": 0.6, - "reg_lambda": 2.5, - "early_stopping_rounds": 20, - "eval_metric": "rmse" - }, - "identifier": "live-freqai", - "write_metrics_to_disk": false, - "conv_width": 1, - "expiration_hours": 0, - "save_backtest_models": false, - "activate_tensorboard": true, - "wait_for_training_iteration_on_reload": true, - "continual_learning": false, - "keras": false - }, + "freqai": { + "enabled": true, + "data_kitchen": { + "fillna": "ffill" + }, + "freqaimodel": "XGBoostRegressorMultiTarget", + "purge_old_models": 2, + "train_period_days": 14, + "backtest_period_days": 2, + "live_retrain_hours": 2, + "outlier_detection": { + "method": "IsolationForest", + "contamination": 0.2 + }, + "feature_selection": { + "method": "recursive_elimination", + "feature_number": 15 + }, + "feature_parameters": { + "include_timeframes": [ + "3m", + "15m", + "1h", + "4h" + ], + "include_corr_pairlist": [ + "XAUT/USDT", + ], + "outlier_protection_percentage": 0.2, + "label_period_candles": 100, + "include_shifted_candles": 2, + "DI_threshold": 0.5, + "weight_factor": 0.7, + "principal_component_analysis": true, + "n_components": 0.85, + "use_SVM_to_remove_outliers": true, + "indicator_periods_candles": [ + 10, + 20, + 50 + ], + "plot_feature_importances": 10, + "shuffle_after_split": false, + "buffer_train_data_candles": 0, + "smooth_features": true, + "smooth_window": 5 + }, + "data_split_parameters": { + "test_size": 0.25, + "shuffle": false + }, + "model_training_parameters": { + "n_estimators": 150, + "learning_rate": 0.025, + "max_depth": 4, + "min_child_weight": 5, + "subsample": 0.6, + "colsample_bytree": 0.6, + "reg_alpha": 0.5, + "reg_lambda": 2.0, + "verbosity": 0 + }, + "identifier": "live-freqai", + "write_metrics_to_disk": false, + "conv_width": 1, + "expiration_hours": 0, + "save_backtest_models": false, + "activate_tensorboard": true, + "wait_for_training_iteration_on_reload": true, + "continual_learning": false, + "keras": false + }, "api_server": { "enabled": true, "listen_ip_address": "0.0.0.0",