scoringutils
scoringutils copied to clipboard
Error handling for correlations and plotting correlations
The function should give you an intuitive error message, when you try to pass the output form "summarise_scores" directly into "plot_correlations".
correlation should give a warning when it filters out columns because not all values are numeric or finite here:
# remove all non metrics and non-numeric columns
df <- scores[, .SD, .SDcols = sapply(
scores,
function(x) {
(all(is.numeric(x))) && all(is.finite(x))
}
)]