eds
EnDS
Bases: object
Ensemble Data Space Analysis using the approach of He et al (2018) (https://doi.org/10.2118/182609-PA)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pst
|
varies
|
something that can be cast into a |
None
|
sim_ensemble
|
varies
|
something that can be cast into a |
None
|
noise_ensemble
|
varies
|
something that can be cast into a |
None
|
obscov
|
varies
|
observation noise covariance matrix. If |
None
|
forecasts
|
enumerable of `str`
|
the names of the entries in |
required |
verbose
|
`bool`
|
controls screen output. If |
False
|
Example::
#assumes "my.pst" exists
ends = pyemu.EnDS(ensemble="my.0.obs.jcb",forecasts=["fore1","fore2"])
ends.get_posterior_prediction_moments() #similar to Schur-style data worth
ends.prep_for_dsi() #setup a new pest interface() based on the DSI approach
obscov
property
get the observation noise covariance matrix attribute
Returns:
| Type | Description |
|---|---|
|
|
pst
property
the pst attribute
Returns:
| Type | Description |
|---|---|
|
|
__fromfile(filename, astype=None)
a private method to deduce and load a filename into a matrix object. Uses extension: 'jco' or 'jcb': binary, 'mat','vec' or 'cov': ASCII, 'unc': pest uncertainty file.
__load_ensemble(arg)
private method to set the ensemble attribute from a file or a dataframe object
__load_obscov()
private method to set the obscov attribute from: a pest control file (observation weights) a pst object a matrix object an uncert file an ascii matrix file
__load_pst()
private method set the pst attribute
get_posterior_prediction_convergence_summary(num_realization_sequence, num_replicate_sequence, obslist_dict=None)
repeatedly run `EnDS.get_predictive_posterior_moments() with less than all the possible realizations to evaluate whether the uncertainty estimates have converged
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
num_realization_sequence
|
`[int']
|
the sequence of realizations to test. |
required |
num_replicate_sequence
|
`[int]`
|
The number of replicates of randomly selected realizations to test
for each |
required |
obslist_dict
|
`dict`
|
a nested dictionary-list of groups of observations
to pass to |
None
|
Returns:
| Type | Description |
|---|---|
|
|
Example::
ends = pyemu.EnDS(pst="my.pst",sim_ensemble="my.0.obs.csv",predictions=["predhead","predflux"])
obslist_dict = {"hds":["head1","head2"],"flux":["flux1","flux2"]}
num_reals_seq = [10,20,30,100,1000] # assuming there are 1000 reals in "my.0.obs.csv"]
num_reps_seq = [5,5,5,5,5]
mean_dfs = sc.get_posterior_prediction_convergence_summary(num_reals_seq,num_reps_seq,
obslist_dict=obslist_dict)
get_posterior_prediction_moments(obslist_dict=None, sim_ensemble=None, include_first_moment=True)
A dataworth method to analyze the posterior (expected) mean and uncertainty as a result of conditioning with some additional observations not used in the conditioning of the current ensemble results.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
obslist_dict
|
`dict`
|
a nested dictionary-list of groups of observations
that are to be treated as gained/collected. key values become
row labels in returned dataframe. If |
None
|
sim_ensemble
|
`pyemu.ObservationEnsemble`
|
the simulation results ensemble to use.
If |
None
|
include_first_moment
|
`bool`
|
flag to include calculations of the predictive first moments.
This can slow things down,so if not needed, better to skip. Default is |
True
|
Returns:
| Type | Description |
|---|---|
|
tuple containing |
|
|
|
|
|
|
Example::
ends = pyemu.EnDS(pst="my.pst",sim_ensemble="my.0.obs.csv",predictions=["predhead","predflux"])
obslist_dict = {"hds":["head1","head2"],"flux":["flux1","flux2"]}
mean_dfs,dfstd,dfpercent = sc.get_posterior_prediction_moments(obslist_dict=obslist_dict)
reset_obscov(arg=None)
reset the obscov attribute to None
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
arg
|
`str` or `pyemu.Matrix`
|
the value to assign to the obscov attribute. If None, the private __obscov attribute is cleared but not reset |
None
|
reset_pst(arg)
reset the EnDS.pst attribute
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
arg
|
`str` or `pyemu.Pst`
|
the value to assign to the pst attribute |
required |