Reparameterizations


Instances of DiffusionProcess are mutable so their fields may be changed directly. We provide additional convenience functions for reparameterizations. The first one clones the object and creates a new one with new parameters:

DiffusionDefinition.cloneFunction
clone(P::T, θ::AbstractDict) where T <: DiffusionProcess

Simplified cloning of diffusion law P. Substitute relevant parameters with new values. θ must be a dict corresponding to parameters returned after a call to var_parameters.

source

However, it's not recommended to rely on it and it will become deprecated in the near future.

A more efficient function, suitable for the MCMC setting is:

DiffusionDefinition.set_parameters!Function
set_parameters!(P::DiffusionProcess, θ, entries)

Set parameters of a diffusion law P in-place. entries should be a collection of pairs Pair{Int64,Symbol} that list the relevant entries in θ for reparameterization, together with the corresponding parameter names.

source