feat(training): 添加缺失值填充处理器 NullFiller
新增 NullFiller 处理器,支持 zero/mean/median/value 填充策略, 支持全局统计量或按日期截面填充。在回归训练流程中添加 NullFiller。
This commit is contained in:
@@ -19,7 +19,7 @@ from src.training import (
|
||||
StockFilterConfig,
|
||||
StockPoolManager,
|
||||
Trainer,
|
||||
Winsorizer,
|
||||
Winsorizer, NullFiller,
|
||||
)
|
||||
from src.training.config import TrainingConfig
|
||||
|
||||
@@ -224,6 +224,7 @@ def train_regression_model():
|
||||
|
||||
# 6. 创建数据处理器(从 PROCESSOR_CONFIGS 解析)
|
||||
processors = [
|
||||
NullFiller(strategy="mean"),
|
||||
Winsorizer(**PROCESSOR_CONFIGS[0]["params"]), # type: ignore[arg-type]
|
||||
StandardScaler(exclude_cols=["ts_code", "trade_date", target_col]), # type: ignore[call-arg]
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user