Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exported get_metrics Function #534

Open
DarioS opened this issue Feb 20, 2025 · 0 comments
Open

Exported get_metrics Function #534

DarioS opened this issue Feb 20, 2025 · 0 comments

Comments

@DarioS
Copy link

DarioS commented Feb 20, 2025

If I have done cross-validated classification and want all relevant metrics, there should be a convenience function for that.

get_metrics <- function(fns, type) {
  where <- vapply(fns, inherits, what = type, FUN.VALUE = logical(1))
  paste0("`", sort(names(fns[where])), "()`")
}

It is obscurely in a vignette but it would be better placed in a .R, documented and exported and had only type parameter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant