首页/ AI 技能 / @skilllib/skill-2014279400550772737
Skill站外收录 @skilllib/skill-2014279400550772737

detect-metrics

能够自动识别并列出 yardstick 包中所有可用的评估指标函数,支持通过源码扫描快速定位指标定义、构造器及导出项,适用于需要全面了解或动态调用该包度量能力的分析场景。

0.0 (0) 193 次安装 原作者 编程导航
收录于 2026-01-22
数据与分析 AI 技能

Skills.MD

# Detect metrics ## Detection commands Find all metric definitions (recommended): ```bash grep -E ".* <- new_.*_metric\(" R/*.R ``` Find available metric constructors: ```bash grep -E "^new_.*_metric <- function" R/*.R ``` Check exported metrics: ```bash grep "^export(" NAMESPACE | sed 's/export(//' | sed 's/)//' ``` ## Metric structure Each metric has: 1. Generic function calling `UseMethod()` 2. Constructor wrap: `metric_name <- new_*_metric(metric_name, direction = "minimize"|"maximize"|"zero")` 3. Data frame method using `*_metric_summarizer()` 4. Vector implementation: `metric_name_vec()` ## Key files - `R/aaa-new.R` - Metric constructor definitions - `R/fair-aaa.R` - Groupwise metric constructor - `R/template.R` - Metric summarizer functions

评论 0

还没有评论,来抢沙发。