Skip to content

Commit 44f4a60

Browse files
nikosbosseseabbs
andauthored
Apply suggestions from code review
Co-authored-by: Sam Abbott <contact@samabbott.co.uk>
1 parent 70d7054 commit 44f4a60

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

R/metrics-nominal.R

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,7 @@ assert_input_categorical <- function(
7373
summed_predictions <- round(rowSums(predicted, na.rm = TRUE), 10) # avoid numeric errors
7474
}
7575
# Allow for numeric errors
76-
tolerance <- 1e-4
77-
invalid_rows <- abs(summed_predictions - 1) > tolerance
76+
invalid_rows <- abs(summed_predictions - 1) > 1e-4
7877
if (any(invalid_rows)) {
7978
#nolint start: keyword_quote_linter object_usage_linter
8079
row_indices <- which(invalid_rows)

0 commit comments

Comments
 (0)