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

fix typos in notebook

parent 915b890f
No related merge requests found
Showing with 3 additions and 3 deletions
+3 -3
%% Cell type:markdown id: tags:
## `evalhyd-cli` demonstration
## `evalhyd-cpp` demonstration
%% Cell type:code id: tags:
``` C++14
#include <xtensor/xtensor.hpp>
#include <xtensor/xio.hpp>
#include <evalhyd/evald.hpp>
#include <evalhyd/evalp.hpp>
```
%% Cell type:markdown id: tags:
### Deterministic evaluation
%% Cell type:markdown id: tags:
Define streamflow observations
%% Cell type:code id: tags:
``` C++14
// shape: {1, time: 4}
xt::xtensor<double, 2> obs =
{{4.7, 4.3, 5.5, 2.7}};
```
%% Cell type:markdown id: tags:
Define streamflow predictions
%% Cell type:code id: tags:
``` C++14
// shape: {series: 1, time: 4}
xt::xtensor<double, 2> prd =
{{5.3, 4.2, 5.7, 2.3}};
```
%% Cell type:markdown id: tags:
Compute Nash-Sutcliffe efficiency
%% Cell type:code id: tags:
``` C++14
// shape: {series: 1, subsets: 1, samples: 1}
std::cout << evalhyd::evald(obs, prd, {"NSE"}) << std::endl;
std::cout << evalhyd::evald(obs, prd, {"NSE"})[0] << std::endl;
```
%% Cell type:markdown id: tags:
### Probabilistic evaluation
%% Cell type:markdown id: tags:
Define streamflow observations
%% Cell type:code id: tags:
``` C++14
// shape: {sites: 1, time: 5}
xt::xtensor<double, 2> obs =
{{4.7, 4.3, 5.5, 2.7, 4.1}};
```
%% Cell type:markdown id: tags:
Define streamflow predictions
%% Cell type:code id: tags:
``` C++14
// shape: {sites: 1, lead times: 1, members: 3, time: 5}
xt::xtensor<double, 4> prd =
{{{{5.3, 4.2, 5.7, 2.3, 3.1},
{4.3, 4.2, 4.7, 4.3, 3.3},
{5.3, 5.2, 5.7, 2.3, 3.9}}}};
```
%% Cell type:markdown id: tags:
Define streamflow thresholds
%% Cell type:code id: tags:
``` C++14
// shape: {sites: 1, thresholds: 2}
xt::xtensor<double, 2> thr =
{{4., 5.}};
```
%% Cell type:markdown id: tags:
Compute Brier score
%% Cell type:code id: tags:
``` C++14
// shape: {sites: 1, lead times: 1, subsets: 1, samples: 1, thresholds: 2}
std::cout << evalhyd::evalp(obs, prd, {"BS"}, thr, "high") << std::endl;
std::cout << evalhyd::evalp(obs, prd, {"BS"}, thr, "high")[0] << std::endl;
```
......
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