审查并精简 ChatGPT 的建库建议后落地的第一版骨架,只定接口不写实现。 - 建议审查:14 个包 → 7 个;约 250 个函数 → 约 40 个;5 个 Result 类 → 1 个 (docs/01-suggestion-review.md) - docs/:架构、路线图(含永久不做清单)、环境、Git 工作流、函数卡片模板 - src/mcm_toolkit/:core / data / stats / models / solve / decision / viz 共 23 个模块,均为签名 + docstring + NotImplementedError - tests/:9 个文件,其中 test_api_surface.py 已通过(20 passed) - examples/ problems/ notebooks/ figures/ tables/ 骨架 - pyproject.toml(核心依赖 4 个 + 6 组 extras)、environment.yml - scripts/:setup-venv.ps1(ASCII + LF)、setup-conda.ps1、doctor.ps1 - 环境:.venv(system-site-packages)与 conda 环境 mcm-toolkit 均已建好, 数值栈版本与 base 完全对齐(numpy 2.4.6 / scipy 1.18.1 / pandas 3.0.6,MKL 后端)
33 lines
788 B
Python
33 lines
788 B
Python
"""stats —— 描述统计、统计推断、bootstrap。
|
|
|
|
S 级模块。`bootstrap_ci` 建议自己实现一遍(S 档,配完整函数卡片):
|
|
它是赛题里"没有解析解时怎么给区间"的通用答案。
|
|
"""
|
|
|
|
from .bootstrap import bootstrap_ci, bootstrap_statistic
|
|
from .descriptive import coefficient_of_variation, describe, zscore
|
|
from .inference import (
|
|
anova,
|
|
chi_square_test,
|
|
confidence_interval,
|
|
correlation_matrix,
|
|
fit_distribution,
|
|
goodness_of_fit,
|
|
t_test,
|
|
)
|
|
|
|
__all__ = [
|
|
"describe",
|
|
"zscore",
|
|
"coefficient_of_variation",
|
|
"correlation_matrix",
|
|
"confidence_interval",
|
|
"t_test",
|
|
"anova",
|
|
"chi_square_test",
|
|
"fit_distribution",
|
|
"goodness_of_fit",
|
|
"bootstrap_statistic",
|
|
"bootstrap_ci",
|
|
]
|