Skip to content

Look at iic metric for perfect prediction #599

@EmilHvitfeldt

Description

@EmilHvitfeldt

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

Metadata

Metadata

Assignees

Labels

featurea feature request or enhancement

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions