Files
MCM-ICM_Toolkit/README.md
T
guzhujushi 1aca8680fb docs: 让文档与环境/仓库真实状态一致
- STATUS.md:补 D. Git 仓库小节(init/首次提交/行尾复核);
  环境版本按实测复核更新(venv 已随 base 升到 numpy 2.4.6 等);
  遗留项改为「Gitea 远程待配置」并记录沙箱账户的文件所有权副作用;
  新增决策 17(.git 由本人账户重建,不做 safe.directory 豁免)
  与 18(仓库级 core.autocrlf=false)
- docs/05-git-workflow.md:开头改为「已初始化,待配远程」;
  新增 §4 仓库归属注意,说明 dubious ownership 的成因与正确处置
- README.md:conda 脚本说明由「clone base,离线」更正为「精准包列表」;
  补一行仓库状态
2026-10-01 17:45:54 +08:00

71 lines
2.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# MCM/ICM Toolkit
美赛(MCM/ICM)编程手的**竞赛层工具箱**:
把比赛中反复手写的代码沉淀成"高频算法自己实现 + 成熟库薄封装 + 统一结果接口"。
> **不**替代 SciPy / scikit-learn / statsmodels / NetworkX / SALib / SymPy。
> 只做它们到"4 天赛程能用"之间的那一层。
## 快速开始
```powershell
# 1) 建环境(两条路选一条)
.\scripts\setup-venv.ps1 # venv,零下载,复用 Anaconda base 的科学栈
.\scripts\setup-conda.ps1 # conda 环境 mcm-toolkit(精准包列表,走代理下载)
# 2) 自检
.\scripts\doctor.ps1
# 3) 激活
.\.venv\Scripts\Activate.ps1
```
```python
import mcm_toolkit as mcm
mcm.set_seed(42)
r = mcm.bootstrap_ci(data, statistic=np.median, random_state=42)
print(r.params["low"], r.params["high"])
```
## 当前状态(v0.0.1)
本地 git 仓库已初始化(`main`,首次提交 `5319589`),远程 Gitea 待配置。
**接口已定,实现未填。** 所有函数体是 `raise NotImplementedError` + `TODO(L0/L1/v0.2)` 标记,
按 [docs/03-roadmap.md](docs/03-roadmap.md) 的 L0 → L1 顺序填。
## 目录
| 路径 | 说明 |
|---|---|
| `src/mcm_toolkit/` | 包源码,7 个子包 |
| `tests/` | 测试,与包一一对应(测已知解析解,不测实现细节) |
| `examples/` | 每个模块一个能跑的最小例子 |
| `problems/` | 历年真题(每做完一题,反向沉淀 1~3 个通用函数) |
| `notebooks/` | 探索用 |
| `docs/` | 需求、架构、路线图、环境、规范 |
| `scripts/` | 环境脚本 |
| `STATUS.md` | 当前进度 |
## 子包
| 包 | 职责 | 关键函数 |
|---|---|---|
| `core` | 基础设施 | `Result` `get_rng` `check_*` |
| `data` | 读 / 洗 / 变换 / 采样 | `load_table` `detect_outliers` `normalize` |
| `stats` | 描述 / 推断 / bootstrap | `describe` `bootstrap_ci` `fit_distribution` |
| `models` | 回归 / 时序 / ML | `fit_linear` `fit_arima` `compare_models` |
| `solve` | 优化 / 模拟 / 敏感性 | `monte_carlo` `simulated_annealing` `sobol_analyze` |
| `decision` | 评价决策 | `entropy_weights` `ahp_weights` `topsis` `gm11` |
| `viz` | 出图出表 | `plot` `save_figure` `save_table` |
## 文档
开始动手前请先读 [docs/01-suggestion-review.md](docs/01-suggestion-review.md)——
它记录了"为什么最终结构是这样",以及**明确不做什么**。
## 许可
MIT,见 [LICENSE](LICENSE)。