Commit f58170a5 authored by Thibault Hallouin's avatar Thibault Hallouin
Browse files

fix mistake in computation of CRPS_FROM_ECDF

1 merge request!3release v0.1.0
Pipeline #45799 failed with stage
in 3 minutes and 58 seconds
Showing with 5 additions and 4 deletions
+5 -4
......@@ -107,16 +107,17 @@ namespace evalhyd
);
// compute crps as difference between the quadratic CDFs
auto p_i_2 = xt::eval(
auto p_i = xt::eval(
xt::view(
xt::square(xt::arange<double>(n_mbr + 1) / n_mbr),
xt::arange<double>(n_mbr + 1) / n_mbr,
xt::all(), xt::newaxis(), xt::newaxis(),
xt::newaxis()
)
);
auto crps_from_ecdf = xt::sum(
(alpha_i * p_i_2) + (beta_i * (1 - p_i_2)),
(alpha_i * xt::square(p_i))
+ (beta_i * xt::square(1 - p_i)),
0
);
......
271.9578705197483
262.615225902479
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment