mcpField
M
math-model-selector

math-model-selector

github.com/parcadei其他3.9k102 次安装39 周前更新
代码仓库

关于 math-model-selector

一种通过逐步提问为问题选择数学框架的技能,面向不确定应采用哪个数学领域的用户。它根据变化、随机性、优化目标和所需精度引导选择。

主要功能

  1. 01按问题特征选择数学领域
  2. 02区分离散与连续变化
  3. 03评估随机性与不确定性
  4. 04检查优化目标及其类型
  5. 05按所需精度建议方法

适用场景

  1. 01为现实问题确定适用的数学框架
  2. 02为建模选择初始方程或方法
  3. 03根据回答精度选择分析或模拟

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/parcadei/continuous-claude-v3 --skill math-model-selector

安装后在 Claude Code 中输入/math-model-selector确认已加载。

详细介绍

数学模型选择器

适用场景

在用户提到以下内容时触发:

  • “我应该用什么数学方法”
  • “应该用哪种数学框架”
  • “如何对这个问题建模”
  • “这属于哪类问题”
  • “将这个问题形式化”

当用户遇到问题,却不知道该应用哪个数学领域时使用。

流程

使用波利亚式提问,引导用户完成决策树:

1. 确定量

询问:“你想了解哪种量或现象?”

  • 物理问题 -> 守恒定律、微分方程
  • 经济学 -> 均衡、优化
  • 数据模式 -> 统计学、回归
2. 描述变化

询问:“什么在变化?变化方式是什么?”

  • 离散步骤 -> 差分方程、递推关系
  • 连续变化率 -> ODE
  • 变化率也会变化 -> 二阶 ODE
  • 空间变化 -> PDE
3. 检查不确定性

询问:“是否涉及随机性或不确定性?”

  • 确定性 -> 标准分析
  • 认知不确定性 -> 贝叶斯方法
  • 随机过程 -> 概率论、随机过程
4. 检查优化需求

询问:“你要优化某项内容吗?”

  • 凸目标函数 -> 线性/二次规划
  • 非凸 -> 梯度下降、进化方法
  • 离散选择 -> 组合数学、整数规划
5. 确定答案精度

询问:“你需要什么精度的答案?”

  • 粗略估算 -> 量纲分析
  • 定性行为 -> 相图、稳定性
  • 数值答案 -> 模拟
  • 精确闭式解 -> 解析方法

要提出的关键问题

  1. 什么在变化?(离散还是连续)
  2. 是什么导致变化?(变化率的依赖关系)
  3. 什么是随机的?(不确定性的类型)
  4. 要优化什么?(目标函数)
  5. 需要多精确?(定性还是定量)

输出格式

Framework Recommendation:
- Primary: [framework name]
- Why: [one-sentence justification]

Starting Point:
- Key equations: [relevant formulas]
- Initial approach: [first step]

Tools to Use:
- [specific script or computation tool]

Related Skills:
- [domain skill to activate next]

示例对话

User: I want to model how a rumor spreads through a population

Claude: Let me help you find the right framework.

Q1: What quantity are we tracking?
> Number of people who heard the rumor over time.

Q2: What causes it to change?
> Spread rate depends on who knows and who doesn't.

Q3: Is there randomness?
> Assume deterministic (average behavior) for now.

Q4: Optimizing anything?
> No, just understanding dynamics.

Q5: What precision?
> Qualitative behavior, maybe predict peak rate.

Framework Recommendation:
- Primary: First-order ODE (logistic growth)
- Why: Rate depends on current state nonlinearly

Starting Point:
- dN/dt = r * N * (1 - N/K)
- N = heard count, K = population, r = spread rate

Tools:
- sympy_compute.py solve (equilibrium)
- Phase line for qualitative behavior

Related Skills:
- math/math-intuition-builder (understand the model)
- odes-pdes/first-order-odes (solve it)

联合激活

选择框架后,建议使用:

  • math-intuition-builder - 理解该框架
  • 相关领域技能 - 执行实际计算
  • math-mode - 进行符号验证

评论

支持 Markdown