tidyverts / fabletools

General fable features useful for extension packages
http://fabletools.tidyverts.org/
89 stars 31 forks source link

CRPS code vs formula #292

Closed git314 closed 3 years ago

git314 commented 3 years ago

I have been using this package for CRPS. Everything works great! I am just curious how you got this formula. When I look at this paper

https://cran.r-project.org/web/packages/scoringRules/vignettes/article.pdf

PNG image

The formula has m^2 in the denominator.

When I look at the code m is not squared.

https://github.com/tidyverts/fabletools/blob/1fbbb7b556f02bd5e0f650e7eb68edc781b61074/R/accuracy.R#L211

Again, there is nothing wring with the results. I am just curious, from a math perspective, where the m^2 went.

robjhyndman commented 3 years ago

We use 2/m * mean not 2/m^2 * sum