48 lines
1.5 KiB
Python
48 lines
1.5 KiB
Python
|
|
"""增强探针法因子筛选 (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",
|
|||
|
|
]
|