Skip to content
Snippets Groups Projects
Commit 0886c03b authored by Rob Moss's avatar Rob Moss
Browse files

Record more credible intervals by default

The ModelCIs and PredictiveCIs tables now default to recording more
credible intervals than they did previously. These defaults can be
overridden in the scenario parameters, by defining a custom list of
credible intervals for 'summary.tables.TABLE.credible_intervals'.
parent ffd766c5
Branches
Tags
No related merge requests found
Pipeline #17272 passed
......@@ -44,6 +44,7 @@ time.until = 15.0
summary.from_first_day = true
summary.meta.packages = [ "matplotlib" ]
summary.tables.model_cints.credible_intervals = [ 0, 50, 95 ]
summary.tables.forecasts.credible_intervals = [ 0, 50, 95 ]
[scenario.example]
name = "Example Scenario"
......
......@@ -293,12 +293,12 @@ class ModelCIs(Table):
:param probs: an array of probabilities that define the size of each
central credible interval.
The default value is ``numpy.uint8([0, 50, 90, 95, 99, 100])``.
The default value is ``numpy.uint8([0, 50, 60, 70, 80, 90, 95, 99, 100])``.
"""
def __init__(self, probs=None):
if probs is None:
probs = np.uint8([0, 50, 90, 95, 99, 100])
probs = np.uint8([0, 50, 60, 70, 80, 90, 95, 99, 100])
self.__probs = probs
def dtype(self, ctx, obs_list, name):
......@@ -500,12 +500,12 @@ class PredictiveCIs(Table):
:param exp_obs_monitor: a :class:`pypfilt.summary.ExpectedObsMonitor`.
:param probs: an array of probabilities that define the size of each
central credible interval.
The default value is ``numpy.uint8([0, 50, 95])``.
The default value is ``numpy.uint8([0, 50, 60, 70, 80, 90, 95])``.
"""
def __init__(self, exp_obs_monitor, probs=None):
if probs is None:
probs = np.uint8([0, 50, 95])
probs = np.uint8([0, 50, 60, 70, 80, 90, 95])
self.__probs = np.sort(probs)
self.__monitor_name = exp_obs_monitor
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment