← ClaudeAtlas

add-yardstick-metriclisted

Guide for creating new yardstick metrics. Use when a developer needs to extend yardstick with a custom performance metric, including numeric, class, probability, ordered probability, survival (static, dynamic, integrated, linear predictor), and quantile metrics.
tidymodels/skills · ★ 10 · Code & Development · score 62
Install: claude install-skill tidymodels/skills
# Add Yardstick Metric Guide for developing new metrics that extend the yardstick package. This skill provides best practices, code templates, and testing patterns for creating custom performance metrics. -------------------------------------------------------------------------------- ## Two Development Contexts This skill supports **two distinct development contexts**: ### 🆕 Extension Development (Default) **Creating a new R package** that extends yardstick with custom metrics. - ✅ Use this for: New packages, standalone metrics, CRAN submissions - ⚠️ **Constraint**: Can only use exported functions (no `:::`) ### 🔧 Source Development (Advanced) **Contributing directly to yardstick** via pull requests. - ✅ Use this for: Contributing to tidymodels/yardstick repository - ✨ **Benefit**: Can use internal functions and package infrastructure -------------------------------------------------------------------------------- ## Getting Started **INSTRUCTIONS FOR CLAUDE:** Run the verification script first to determine the development context: ```bash Rscript -e 'source(Sys.glob(path.expand("~/.claude/plugins/cache/tidymodels-skills/tidymodels-dev/*/tidymodels/shared-references/scripts/verify-setup.R"))[1])' ``` **Then follow the appropriate path based on the output:** - **Output: "All checks for source development complete."** → Go to [Source Development Guide](references/source-guide.md) - **Output: "All checks for extension development complete." (no warnings)*