poisson_loss
function
defined in module
Flux.Losses
poisson_loss(ŷ, y; agg = mean)
Return how much the predicted distribution
ŷ
diverges from the expected Poisson distribution
y
; calculated as -
sum(ŷ .- y .* log.(ŷ)) / size(y, 2)
julia> y_model = [1, 3, 3]; # data should only take integral values
julia> Flux.poisson_loss(y_model, 1:3)
0.5023128522198171
There is
1
method for Flux.Losses.poisson_loss
:
The following pages link back here: