Open yonisidi opened 2 months ago
The original code for the poisson_log_loss was taken from {MLmetrics} and it works well overall, but has some edge cases when Inf is returned
poisson_log_loss
eg dpois(ypred, 0) = 0, dpois(ypred, 0, log = TRUE) = -Inf
dpois(ypred, 0) = 0
dpois(ypred, 0, log = TRUE) = -Inf
taking the mean of a vector with that you get Inf
Inf
{MLmetrics} has since updated their function to be aligned with the standard entropy loss function, which resolves this edge case.
would it be possible to update the yardstick function to re-align with {MLmetrics}? see @example in the {MLmetrics} link
@example
Hello @yonisidi 👋
Sure would! I'll take a look next time to do a yardstick issue push
awesome. ty
The original code for the
poisson_log_loss
was taken from {MLmetrics} and it works well overall, but has some edge cases when Inf is returnedeg
dpois(ypred, 0) = 0
,dpois(ypred, 0, log = TRUE) = -Inf
taking the mean of a vector with that you get
Inf
{MLmetrics} has since updated their function to be aligned with the standard entropy loss function, which resolves this edge case.
would it be possible to update the yardstick function to re-align with {MLmetrics}? see
@example
in the {MLmetrics} link