‹ 首页

ahp-weighting

@yogsoth-ai · 收录于 5 天前 · 上游提交 2 周前

SOP: Use the AHP (Analytic Hierarchy Process) to determine scoring-dimension weights, outputting a weight vector

适合你,如果需要在多维度评分中科学确定各维度权重

/ 通过 npx 安装 校验哈希
npx oh-my-skill add yogsoth-ai/de-anthropocentric-research-engine/ahp-weighting
/ 通过 bash 安装
curl -fsSL https://oh-my-skill.com/install.sh | bash -s -- yogsoth-ai/de-anthropocentric-research-engine/ahp-weighting
/ 已经装过?验证本机副本,不用重装
npx oh-my-skill verify yogsoth-ai/de-anthropocentric-research-engine/ahp-weighting
安装目标可用 --agent / --scope 或 --to 明确指定;省略时只会在唯一已存在的 agent 目录上自动选择,零命中或多命中会停止并提示。content_hash 缺失或不一致均拒装。
388GitHub stars
~506最小装载
~506含声明引用
~1.2K文本包总量
索引托管

怎么用

商店整理自技能原文 · 版本 59ace64 · 表述以原文为准
它做什么

安装后,Claude 会使用层次分析法(AHP)计算多个维度的权重。它引导你确认维度列表,输入两两比较的比值(1-9),然后输出权重向量、一致性比率(CR)和判断矩阵。若 CR>0.1,会给出修改建议。

什么时候触发

当你需要给 2 到 9 个评分维度分配权重,并希望基于数学一致性时触发。例如要求“用 AHP 计算这些维度的权重”时接管。

装好后可以这样说
Claude 会依次询问两两比较的比值并计算权重。
如果你事先准备好了比较矩阵,Claude 会跳过询问步骤。
技能原文 SKILL.md作者撰写 · Apache-2.0 · 59ace64

AHP Weighting

Use the AHP (Analytic Hierarchy Process) to determine scoring-dimension weights, outputting a weight vector.

HARD-GATE

<HARD-GATE>

  • The number of input dimensions must be in the range [2, 9] (AHP applicability range)
  • The elements of the output weight vector must sum to 1.0 (±0.001 tolerance allowed)
  • The consistency ratio CR must be computed and reported; if CR > 0.1 a warning must be flagged

</HARD-GATE>

Pipeline
  1. Precondition check: verify the dimension list is non-empty and its count is in the range [2, 9]
  2. Dimension list confirmation: output the dimension list for the caller to confirm; if a comparison matrix is already provided, skip to step 4
  3. Pairwise comparison matrix construction: for each pair of dimensions (i, j) assign a Saaty scale value (1-9); the matrix must satisfy a[j][i] = 1/a[i][j]
  4. Eigenvector computation: normalize each column then take row means to obtain the priority vector (weights)
  5. Consistency ratio check: compute the largest eigenvalue λ_max → consistency index CI = (λ_max - n)/(n-1) → CR = CI/RI (look up the Saaty RI table); CR < 0.1 is acceptable
  6. Output: return the AHPWeights object; if CR > 0.1 attach revision suggestions
Output Format
{
  "dimensions": ["importance", "feasibility", "novelty", "impact"],
  "comparison_matrix": [[1, 3, 2, 2], [0.33, 1, 0.5, 0.5], [0.5, 2, 1, 1], [0.5, 2, 1, 1]],
  "weights": { "importance": 0.40, "feasibility": 0.15, "novelty": 0.23, "impact": 0.22 },
  "lambda_max": 4.02,
  "ci": 0.007,
  "ri": 0.90,
  "cr": 0.008,
  "cr_acceptable": true,
  "warnings": [],
  "revision_suggestions": []
}

</output>

按 Apache-2.0 许可原样转载,未经改动 · 在 GitHub 查看 →

评论

登录即可评论;带「已验证安装」的,是发布者名下有本店的安装或持有记录。