# generate config from spux.utils import shell shell.importer('config.py') # plotting class from spux.plot.mpl import MatPlotLib plot = MatPlotLib() # plot datasets plot.datasets() # plot marginal prior distributions plot.priors() # plot error model distribution treating each dataset point as prediction # and a random realization of parameters from prior distribution from datasets import datasets from error import h for name, dataset in datasets.items(): dataset = dataset() xs = dataset['x'].copy(deep=1) for index in dataset.index: xs.loc[index] = h.inverse(xs.loc[index]) dataset[r'$\xi$'] = xs plot.errors(predictions=datasets) # plot distributions for the initial model values from initial import initial plot.distributions(initial, suffix='-initial') # report status
# generate config from spux.utils import shell shell.importer('config.py') # plotting class from spux.plot.mpl import MatPlotLib from exact import exact plot = MatPlotLib(exact=exact) # plot dataset plot.dataset() # plot marginal prior distributions plot.priors() # plot marginal error model distributions plot.errors() # plot marginal prior distributions for the initial model values from inputset import inputset exact_initial = exact['predictions'].iloc[0] plot.distributions(inputset['initial'], samples={'exact': exact_initial}, suffix='-initial') # generate report from spux.report import generate generate.report(authors=r'Jonas {\v S}ukys')
# load posterior samples from spux.io import loader samples, infos = loader.reconstruct() # burnin burnin = 150 # plotting class from spux.plot.mpl import MatPlotLib plot = MatPlotLib(samples, infos, burnin=burnin) # plot unsuccessful posteriors plot.unsuccessfuls() # plot resets of stuck chains plot.resets() # compute and report approximated maximum a posterior (MAP) parameters estimate plot.MAP() # plot samples plot.parameters() # plot evolution of likelihoods plot.likelihoods() # plot evolution of likelihood accuracies plot.accuracies() # plot evolution of likelihood particles plot.particles()
# === LOADING from spux.io import loader samples, infos = loader.reconstruct(timingsfiles=None) # === RESULTS # plotting class from spux.plot.mpl import MatPlotLib from exact import exact plot = MatPlotLib(samples, infos, exact=exact) # plot unsuccessful posteriors plot.unsuccessfuls() # plot samples plot.parameters() # plot evolution of likelihoods plot.distances() # plot evolution of acceptances plot.acceptances() # plot pairwise joint posterior distributions plot.posteriors2d(suffix='-progress') # plot pairwise joint posterior distribution for selected parameter pairs plot.posterior2d('drift', 'volatility', suffix='-progress') # === RESULTS
# === load results from spux.io import loader samples, infos = loader.reconstruct () # === plot # burnin sample batch burnin = 75 # plotting class from spux.plot.mpl import MatPlotLib from exact import exact plot = MatPlotLib (samples, infos, burnin = burnin, exact = exact) # plot unsuccessful posteriors plot.unsuccessfuls () # plot samples plot.parameters () # compute Bayesian model evidence (best with burnin removed) plot.evidence (burnin) # plot evolution of likelihoods plot.likelihoods () # plot evolution of likelihood accuracies plot.accuracies () # plot evolution of likelihood particles