morpho.processors.sampling.PyStanSamplingProcessor module

Some template vars

Members: PyStanSamplingProcessor

Functions:

Classes:

PyStan sampling processor Authors: J. Formaggio, J. Johnston, M. Guigue, T. Weiss Date: 06/26/18

Summary

Data:

Reference

class morpho.processors.sampling.PyStanSamplingProcessor.PyStanSamplingProcessor(name)[source]

Bases: morpho.processors.BaseProcessor.BaseProcessor

Sampling processor that will call PyStan.

Parameters:
  • model_code (required) – location of the Stan model
  • function_files_location – location of the Stan functions
  • model_name – name of the cached model
  • cache_dir – location of the cache folder (containing cached models)
  • input_data – dictionary containing model input data
  • iter (required) – total number of iterations (warmup and sampling)
  • warmup – number of warmup iterations (default=iter/2)
  • chain – number of chains (default=1)
  • n_jobs – number of parallel cores running (default=1)
  • interestParams – parameters to be saved in the results variable
  • no_cache – don’t create cache
  • force_recreate – force the cache regeneration
  • init – initial values for the parameters
  • control – PyStan sampling settings
Input:
data: dictionary containing model input data
Results:
results: dictionary containing the result of the sampling of the parameters of interest
data
gen_arg_dict()[source]
InternalConfigure(params)[source]

Method called by Configure() to set up the object. Must be overridden by child class.

InternalRun()[source]

Method called by Run() to run the object. Must be overridden by child class.