Tidy Characterizations of Model Performance
Overview
Tidy tools for quantifying how well model fits to a data set such as confusion matrices, class probability curve summaries, and regression metrics (e.g., RMSE).
Breaking Changes
- The global option
yardstick.event_first(deprecated in 0.0.7) now throws an error. Use theevent_levelargument of individual metric functions instead. (#632) conf_mat()now throws an error if anything is passed to...(deprecated in 1.0.0). This argument has had no effect since case weight support was added. (#632)roc_auc(),roc_aunp(),roc_aunu(), androc_curve()now throw an error if a non-empty list is passed tooptions(deprecated in 1.0.0). Use the pROC package directly if you need these features. (#632)
Deprecations
dots_to_estimate(),metric_summarizer(), andmetric_vec_template()(soft-deprecated in 1.2.0) now warn for all users. See the yardstick 1.2.0 release notes for recommended replacements. (#632)
New Metrics
gini_coef()computes the normalized Gini coefficient for regression, which measures ranking ability based on the Lorenz curve. (#147)mse()computes the mean squared error. (#560)rmse_relative()computes the relative root mean squared error, normalizing RMSE by the range of the true values. (#527)fall_out()andmiss_rate()compute the false positive rate and false negative rate respectively. (#336)markedness()computes the markedness metric (PPV + NPV - 1), the predictive power analog ofj_index(). (#27)
Show all changes in 1.4.0Hide the rest of the changes in 1.4.0
roc_dist()computes the Euclidean distance from the (sensitivity, specificity) point to the ideal point (1, 1) in ROC space. (#148)sedi()computes the Symmetric Extremal Dependence Index, a prevalence-independent skill metric for binary classification that remains reliable at extreme class imbalance. (#630)ranked_prob_score()computes the ranked probability score for ordinal classification data. (#524)weighted_interval_score()is a new quantile metric. (#569)
Improvements
- Added checks to all metrics for the
na_rmargument. (#349) - Added improved argument checking for metrics with additional arguments. (#519)
- Added documentation pages for each metric type (e.g.,
?class-metrics,?numeric-metrics) listing all available metrics with their direction and range. (#547, #540) - All class metrics and probability metrics now include mathematical formulas in their documentation. (#605)
- All metrics now document their valid range of output values. (#572)
- Documentation pages for metrics with alternate argument values now emphasize using
metric_tweak()when building metric sets. (#626) - Survival metrics performance has been improved. (#576)
brier_class()has gained theevent_levelargument. (#515)get_metrics()has been added to return ametric_set()containing all metrics of a specified type. (#534)metric_set()now provides a more informative error message whenestimateis not explicitly named for class/prob or survival metric sets. (#504)roc_curve()has gained athresholdsargument for specifying custom thresholds at which the curve is evaluated. (#488)
Bug Fixes
brier_class()no longer returnsNaNwith extreme value case weights. (#614)classification_cost()documentation now correctly refers to thecostcolumn of the costs data frame. (#343)mpe()documentation now includes the formula and clarifies the interpretation of positive and negative values. (#345)poisson_log_loss()now handles 0-valued estimates without returningInforNaN. (#513)- Fixed a bug where ranked probability metrics didn't work in combination with other classification metrics in
metric_set(). (#539) - Fixed documentation to show equations correctly. (#541)
Developer
- Added infrastructure for quantile metrics. (#569)
- Added infrastructure for survival metrics on the linear predictor. (#551)
new_metric()and related functions gain an optionalrangeargument to store the valid output range of a metric. (#572)- Removed crayon as a suggested package. (#574)
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-04
- NOTE12 OK, 1 NOTE2026-08-01
- OK12 OK, 1 FAILURE2026-06-08
- NOTE12 OK, 1 NOTE2026-06-07
- OK14 OK2026-03-10
Documentation
- Help pages
- 91 (13 internal)includes a package overview page
- Examples that run
- 100%82 run in a plain check (15 of them under a condition)
- Exported functions with examples
- 89%
- Documented parameters
- 99%
- Return-value docs
- 88%
- Help pages citing references
- 41%
Downloads
Repository
- PRs merged (all time)
- 94%
- Median days to close, 50 most recently updated closed issues
- 393
- Median days to close, 50 most recently updated closed PRs
- 0
Stars over time
Forks over time
Releases over time
Issues over time
PRs over time
Commits over time
Commit identities over time
15 development-tooling and community-health practices detected across 7 families in the upstream repository
Checks run against github.com/tidymodels/yardstick on 2026-10-18.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
GitHub Pages site last deployed 2026-09-17 · The repository has a site deploy workflow
pkgdown site last built 2026-04-07
Show all practicesHide 3 practices
This repository shows signs of AI coding tools.
- Claude Codefirst seen 2026-01-16Seen in the repository: .claude, .claude/skillsNamed in .Rbuildignore: .claudeCommits: at least 1 crediting it in the message
- Claude CodePull requests: 1 from outside contributors, first on 2026-03-05, 1 from forks
- Claude Opus 4.61 commit · Apr 2026
Dependencies
Installing yardstick adds 17 packages (10 with compiled code, 5.9 MB of source tarballs). Heaviest: vctrs 1.0 MB, dplyr 902 KB, rlang 766 KB.
Show the 48 most downloaded packagesHide the 48 most downloaded packages
Code & Tests
Datasets
People & History
Previously maintained by Davis Vaughan (0.0.4 to 1.0.0) and Max Kuhn (0.0.1 to 0.0.3).
Pick two releases to compare their code metrics.
- RR 4.6.0 released · 2026-04-24
- 1.4.0Latest2026-04-07 · current release · diff ↗ ·
added 32 exports
check_linear_pred_survival_metric, check_ordered_prob_metric, check_quantile_metric, fall_out, fall_out_vec, get_metrics, gini_coef, gini_coef_vec, linear_pred_survival_metric_summarizer, markedness, markedness_vec, miss_rate, miss_rate_vec, mse, mse_vec, new_linear_pred_survival_metric, new_ordered_prob_metric, new_quantile_metric, ordered_prob_metric_summarizer, quantile_metric_summarizer, ranked_prob_score, ranked_prob_score_vec, rmse_relative, rmse_relative_vec, roc_dist, roc_dist_vec, royston_survival, royston_survival_vec, sedi, sedi_vec and 2 more - RR 4.5.0 released · 2025-04-11
- 1.3.22025-01-23 · diff ↗
- RR 4.4.0 released · 2024-04-24
- 1.3.12024-03-21 · diff ↗
- 1.3.02024-01-19 · diff ↗ ·
added 4 exports
demographic_parity, equal_opportunity, equalized_odds, new_groupwise_metric - 1.2.02023-04-21 · diff ↗ ·
added 28 exports
brier_class, brier_class_vec, brier_survival, brier_survival_integrated, brier_survival_integrated_vec, brier_survival_vec, check_class_metric, check_dynamic_survival_metric, check_numeric_metric, check_prob_metric, check_static_survival_metric, class_metric_summarizer, concordance_survival, concordance_survival_vec, curve_metric_summarizer, curve_survival_metric_summarizer, dynamic_survival_metric_summarizer, new_dynamic_survival_metric, new_integrated_survival_metric, new_static_survival_metric, numeric_metric_summarizer, prob_metric_summarizer, roc_auc_survival, roc_auc_survival_vec, roc_curve_survival, static_survival_metric_summarizer, yardstick_any_missing, yardstick_remove_missing - RR 4.3.0 released · 2023-04-21
- 1.1.02022-09-08 · diff ↗
- 1.0.02022-06-06 · diff ↗
- RR 4.2.0 released · 2022-04-22
- 0.0.9
- RR 4.1.0 released · 2021-05-18
- 0.0.82021-03-28 · diff ↗ ·
added 5 exports
classification_cost, classification_cost_vec, metric_tweak, msd, msd_vec - 0.0.72020-07-13 · diff ↗ ·
added 5 exports
mpe, mpe_vec, new_class_metric, new_numeric_metric, new_prob_metric
Show 10 earlier eventsHide 10 earlier events
- RR 4.0.0 released · 2020-04-24
- 0.0.62020-03-17 · diff ↗ ·
added 8 exports
roc_aunp, roc_aunp_vec, roc_aunu, roc_aunu_vec, sensitivity, sensitivity_vec, specificity, specificity_vec - 0.0.52020-01-23 · diff ↗
- 0.0.4
- RR 3.6.0 released · 2019-04-26
- 0.0.32019-03-08 · diff ↗ ·
added 8 exports
huber_loss, huber_loss_pseudo, huber_loss_pseudo_vec, huber_loss_vec, mase, mase_vec, smape, smape_vec - 0.0.22018-11-05 · diff ↗ ·
removed 1 export
mnLogLossadded 46 exports
accuracy_vec, bal_accuracy, bal_accuracy_vec, ccc_vec, detection_prevalence, detection_prevalence_vec, dots_to_estimate, f_meas_vec, finalize_estimator, finalize_estimator_internal, gain_capture, gain_capture_vec, gain_curve, get_weights, j_index_vec, kap, kap_vec, lift_curve, mae_vec, mape, mape_vec, mcc_vec, metric_set, metric_summarizer, metric_vec_template, mn_log_loss, mn_log_loss_vec, npv_vec, ppv_vec, pr_auc_vec and 16 more - RR 3.5.0 released · 2018-04-23
- 0.0.12017-11-12
- RR 3.4.0 released · 2017-04-21
Package metadata
- First published
- 2017-11-12
- Total releases
- 16 / 9 yrs
- License
- MIT + file LICENSE OSI · relicensed from GPL-2 in 0.0.8
- Minimum R
- ≥ 4.1
- Bundled data
- 133 KB / 6 files
- Download size
- 1.6 MB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("yardstick")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-22, which the citation names so these numbers can be found later. More on citing and the projects behind them.