Commit 1548ec44 authored by Thibault Hallouin's avatar Thibault Hallouin
Browse files

add missing dimension for evalp output shape

parent e0722aa7
No related merge requests found
Showing with 1 addition and 1 deletion
+1 -1
%% Cell type:markdown id: tags:
### Deterministic evaluation
%% Cell type:code id: tags:
``` python
import numpy
# define streamflow observations
# > shape: {1, time: 4}
obs = numpy.array(
[[4.7, 4.3, 5.5, 2.7]]
)
# define streamflow predictions
# > shape: {series: 1, time:4}
prd = numpy.array(
[[5.3, 4.2, 5.7, 2.3]]
)
```
%% Cell type:code id: tags:
``` python
import evalhyd
# compute Nash-Sutcliffe efficiency
# > shape: {series: 1, subsets: 1, samples: 1}
evalhyd.evald(obs, prd, ["NSE"])
```
%% Cell type:markdown id: tags:
### Probabilistic evaluation
%% Cell type:code id: tags:
``` python
import numpy
# define streamflow observations
# > shape: {sites: 1, time: 5}
obs = numpy.array(
[[4.7, 4.3, 5.5, 2.7, 4.1]]
)
# define streamflow predictions
# > shape: {sites: 1, lead times: 1, members: 3, time: 5}
prd = numpy.array(
[[[[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]]]]
)
# define streamflow thresholds
# > shape: {sites: 1, thresholds: 2}
thr = numpy.array([[4., 5.]])
```
%% Cell type:code id: tags:
``` python
import evalhyd
# compute Brier score
# > shape: {sites: 1, lead times: 1, subsets: 1, samples: 1}
# > shape: {sites: 1, lead times: 1, subsets: 1, samples: 1, thresholds: 2}
evalhyd.evalp(obs, prd, ["BS"], thr, events="high")
```
......
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