Commit 1a7a57a0 authored by fbourgin's avatar fbourgin
Browse files

wip - debug

parent c60101b6
1 merge request!9Resolve "evaluation of quantiles prediction"
Pipeline #63439 failed with stage
in 3 minutes and 37 seconds
Showing with 11 additions and 11 deletions
+11 -11
...@@ -67,21 +67,21 @@ namespace evalhyd ...@@ -67,21 +67,21 @@ namespace evalhyd
for (std::size_t i = 0; i < n_itv; i++) for (std::size_t i = 0; i < n_itv; i++)
{ {
auto a = xt::broadcast(xt::view(quantiles, i), std::vector<std::size_t>({q_lvl.size(), 2})); auto a = xt::broadcast(xt::view(quantiles, i), std::vector<std::size_t>({q_lvl.size(), 2}));
auto b = xt::broadcast(q_lvl, std::vector<std::size_t>({2, q_lvl.size()})); //auto b = xt::broadcast(q_lvl, std::vector<std::size_t>({2, q_lvl.size()}));
auto res = xt::where(xt::equal(a, xt::transpose(b))); //auto res = xt::where(xt::equal(a, xt::transpose(b)));
if (res.size() != 2) //if (res.size() != 2)
{ //{
throw std::runtime_error( // throw std::runtime_error(
"interval-based metric requested, " // "interval-based metric requested, "
"but *c_lvl* not matching *q_lvl" // "but *c_lvl* not matching *q_lvl"
); // );
} else //} else
{ //{
xt::view(itv_bnds, xt::all(), xt::all(), i, 0, xt::all()) = xt::view(itv_bnds, xt::all(), xt::all(), i, 0, xt::all()) =
xt::view(q_prd, 0); xt::view(q_prd, 0);
xt::view(itv_bnds, xt::all(), xt::all(), i, 1, xt::all()) = xt::view(itv_bnds, xt::all(), xt::all(), i, 1, xt::all()) =
xt::view(q_prd, 1); xt::view(q_prd, 1);
} //}
} }
} }
else else
......
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