用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/cxcscmu/SkillLearnBench --skill pareto-optimization命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Handles reading, populating, and saving .docx files using the python-docx library. Use this skill for any tasks involving template filling or modifying Word documents.
Perform various data analysis on SEC 13-F and obtain some insights of fund activities such as number of holdings, AUM, and change of holdings between two quarters.
This skill includes search capability in 13F, such as fuzzy search a fund information using possibly inaccurate name, or fuzzy search a stock cusip info using its name.
基于 SOC 职业分类
正在显示 SKILL.md
| name | pareto-optimization |
| description | Algorithm to identify Pareto-optimal points from a set of multi-objective evaluations. |
When evaluating multiple conflicting objectives (e.g., maximize F1 score, minimize distance), a point is Pareto optimal if no other point is better in all objectives.
import numpy as np
def is_pareto_efficient(costs, maximize=[True, False]):
""\"
Find the pareto-efficient points
costs: An (n_points, n_costs) array
maximize: Boolean array indicating if the corresponding objective should be maximized
""\"
is_efficient = np.ones(costs.shape[0], dtype=bool)
# Adjust costs so we can simply look for points that are strictly "less than or equal"
# For objectives we want to maximize, we negate them.
adjusted_costs = np.copy(costs)
for i, max_obj in enumerate(maximize):
if max_obj:
adjusted_costs[:, i] = -adjusted_costs[:, i]
for i, c in enumerate(adjusted_costs):
if is_efficient[i]:
# Keep any point with a lower cost or not strictly dominated
# A point is strictly dominated if it's >= in all dimensions and > in at least one
is_efficient[is_efficient] = np.any(adjusted_costs[is_efficient] < c, axis=1) | np.all(adjusted_costs[is_efficient] == c, axis=1)
is_efficient[i] = True # And keep self
return is_efficient