褚宏光 bf6baa5483 Add scoring module and enhance HTML viewer with standardization
- Add scripts/scoring/ module with normalizer, sensitivity analysis, and config
- Enhance stock_viewer.html with standardized scoring display
- Add integration tests and normalization verification scripts
- Add documentation for standardization implementation and usage guides
- Add data distribution analysis reports for strength scoring dimensions
- Update discussion documents with algorithm optimization plans
2026-01-30 18:43:37 +08:00

69 lines
1.5 KiB
Python

"""
强度分标准化与配置模块
本模块提供:
1. 分层标准化处理 (normalizer)
2. 配置管理 (config)
3. 敏感性分析 (sensitivity)
"""
from .normalizer import (
normalize_zero_inflated,
normalize_point_mass,
normalize_standard,
normalize_low_variance,
normalize_all,
calculate_strength_equal_weight,
)
# config 模块会在 P2 实现后导入
try:
from .config import (
StrengthConfig,
CONFIG_EQUAL,
CONFIG_AGGRESSIVE,
CONFIG_CONSERVATIVE,
CONFIG_VOLUME_FOCUS,
# 单维度测试模式
CONFIG_TEST_PRICE,
CONFIG_TEST_CONVERGENCE,
CONFIG_TEST_VOLUME,
CONFIG_TEST_GEOMETRY,
CONFIG_TEST_ACTIVITY,
CONFIG_TEST_TILT,
filter_signals,
calculate_strength,
filter_top_n,
)
_has_config = True
except ImportError:
_has_config = False
__all__ = [
'normalize_zero_inflated',
'normalize_point_mass',
'normalize_standard',
'normalize_low_variance',
'normalize_all',
'calculate_strength_equal_weight',
]
if _has_config:
__all__.extend([
'StrengthConfig',
'CONFIG_EQUAL',
'CONFIG_AGGRESSIVE',
'CONFIG_CONSERVATIVE',
'CONFIG_VOLUME_FOCUS',
# 单维度测试模式
'CONFIG_TEST_PRICE',
'CONFIG_TEST_CONVERGENCE',
'CONFIG_TEST_VOLUME',
'CONFIG_TEST_GEOMETRY',
'CONFIG_TEST_ACTIVITY',
'CONFIG_TEST_TILT',
'filter_signals',
'calculate_strength',
'filter_top_n',
])