Right now the metric returns NaN for perfect predictions and I wonder if we can special case it to 1, or if that would mess with other implementations.
yardstick::iic_vec(1:10, 10:1)
#> [1] -1
yardstick::iic_vec(10:1, 10:1)
#> [1] NaN
yardstick::iic_vec(1:10, 1:10)
#> [1] NaN
yardstick::iic_vec(
1:10 + rnorm(10, sd = 0.00001),
1:10 + rnorm(10, sd = 0.00001)
)
#> [1] 0.9249612
Right now the metric returns NaN for perfect predictions and I wonder if we can special case it to 1, or if that would mess with other implementations.