Error in `tt_gcp_fg_setup` for Negative Binomial loss function
There is an error in the Negative Binomial loss function in tt_gcp_fg_setup
:
>> X = [1;2]; M = [0.9;1.9];
>> [fh,gh,lb]=tt_gcp_fg_setup('negative-binomial (2)',X);
>> fh(X,M)
Error using *
Incorrect dimensions for matrix multiplication. Check that the number of columns in the
first matrix matches the number of rows in the second matrix. To perform elementwise
multiplication, use '.*'.
Error in tt_gcp_fg_setup>@(x,m)(2+x).*log(1+m)-x*log(m+1e-10)
Related documentation
>> gh(X,M)
ans =
0.4678
-0.0181
It requires a .*
versus *
in the computation of the final term in the function expression.