feat(probe-selection): 添加探针法因子筛选模块

This commit is contained in:
2026-03-14 22:50:32 +08:00
parent bdf937086f
commit 5541373ded
9 changed files with 1491 additions and 0 deletions

View File

@@ -0,0 +1,47 @@
"""增强探针法因子筛选 (Probe Feature Selection)
基于噪音探针的统计显著性特征选择方法。
核心组件:
- ProbeSelector: 主选择器,协调整个筛选流程
- NoiseGenerator: 噪音生成器Polars 零拷贝注入
- ProbeTrainer: 多任务训练器,支持验证集早停
- ImportanceEvaluator: 重要性评估器,强制 Gain
- LightGBMClassifier: 分类模型
使用示例:
>>> from src.experiment.probe_selection import ProbeSelector
>>>
>>> selector = ProbeSelector(
... n_iterations=3,
... n_noise_features=5,
... validation_ratio=0.15,
... )
>>>
>>> selected_features = selector.select(
... data=train_data,
... feature_cols=all_features,
... target_col_regression="future_return_5",
... date_col="trade_date",
... )
"""
from src.experiment.probe_selection.importance_evaluator import ImportanceEvaluator
from src.experiment.probe_selection.lightgbm_classifier import LightGBMClassifier
from src.experiment.probe_selection.noise_generator import NoiseGenerator
from src.experiment.probe_selection.probe_selector import ProbeSelector
from src.experiment.probe_selection.probe_trainer import (
ProbeTrainer,
create_classification_target,
split_validation_by_date,
)
__all__ = [
"ProbeSelector",
"NoiseGenerator",
"ProbeTrainer",
"ImportanceEvaluator",
"LightGBMClassifier",
"create_classification_target",
"split_validation_by_date",
]