src.model.format

Module Contents

src.model.format.logger[source]
src.model.format.make_quantile_bands(df_base, samples, quantiles=5, 15, 50, 85, 95)[source]

Translate samples to bands with edges defined by the given quantiles and merge them to a base DataFrame.

Parameters
df_basepd.DataFrame

base DataFrame with timestamps/length in accordance of the samples shape

samplesnp.array

the posterior predictive samples

quantiles: list

an iterable with the edges of the bands (0,1), ordered increasingly.

Returns
pd.DataFrame

long format version with the quantile bands of the samples

src.model.format.format_model_estimates(df_base, pp, quantiles=5, 15, 50, 85, 95)[source]

Format the samples into quantile bands for every model variable.

Parameters
df_basepd.DataFrame

base DataFrame with timestamps/length in accordance of the samples shape

ppdict

per model variable (key) the posterior predictive samples

quantiles: list

an iterable with the edges of the bands (0,1), ordered increasingly.

Returns
pd.DataFrame

long format version with the quantile bands of the samples for every model variable