Overview of all functions in the Hierarchical Gaussian Filtering package

HierarchicalGaussianFiltering.get_predictionFunction
get_prediction(hgf::HGF, node_name::String)

Get the prediction for the next timestep for a specified node in an HGF. If an agent is passed instead of an HGF, the HGF is extracted from the substruct in the agent. A single node can also be passed.

source
HierarchicalGaussianFiltering.get_surpriseFunction

getsurprise(hgf::HGF, nodename::String = "u")

Calculates the surprisal at the last input of a specified input node in an HGF. If an agent is passed instead of an HGF, the HGF is extracted from the substruct in the agent. If no node is specified, the surprisal of all input nodes is summed.

source
HierarchicalGaussianFiltering.premade_JGETMethod

premade_JGET(config::Dict; verbose::Bool = true)

The HGF used in the JGET model. It has a single continuous input node u, with a value parent x, and a volatility parent xnoise. x has volatility parent xvol, and xnoise has a volatility parent xnoise_vol.

Config defaults:

  • ("u", "input_noise"): -2
  • ("x", "volatility"): -2
  • ("xvol", "volatility"): -2
  • ("xnoise", "volatility"): -2
  • ("xnoise_vol", "volatility"): -2
  • ("u", "x", "coupling_strength"): 1
  • ("u", "xnoise", "coupling_strength"): 1
  • ("x", "xvol", "coupling_strength"): 1
  • ("xnoise", "xnoisevol", "couplingstrength"): 1
  • ("x", "initial_mean"): 0
  • ("x", "initial_precision"): 1
  • ("xvol", "initial_mean"): 0
  • ("xvol", "initial_precision"): 1
  • ("xnoise", "initial_mean"): 0
  • ("xnoise", "initial_precision"): 1
  • ("xnoisevol", "initialmean"): 0
  • ("xnoisevol", "initialprecision"): 1
source
HierarchicalGaussianFiltering.premade_binary_2levelMethod
premade_binary_2level(config::Dict; verbose::Bool = true)

The standard binary 2 level HGF model, which takes a binary input, and learns the probability of either outcome. It has one binary input node u, with a binary value parent xbin, which in turn has a continuous value parent xprob.

Config defaults:

source
HierarchicalGaussianFiltering.premade_binary_3levelMethod
premade_binary_3level(config::Dict; verbose::Bool = true)

The standard binary 3 level HGF model, which takes a binary input, and learns the probability of either outcome. It has one binary input node u, with a binary value parent xbin, which in turn has a continuous value parent xprob. This then has a continunous volatility parent xvol.

This HGF has five shared parameters: "xprobvolatility" "xprobinitialprecisions" "xprobinitialmeans" "couplingstrengthsxbinxprob" "couplingstrengthsxprob_xvol"

Config defaults:

  • ("xprob", "volatility"): -2
  • ("xvol", "volatility"): -2
  • ("xbin", "xprob", "coupling_strength"): 1
  • ("xprob", "xvol", "coupling_strength"): 1
  • ("xprob", "initial_mean"): 0
  • ("xprob", "initial_precision"): 1
  • ("xvol", "initial_mean"): 0
  • ("xvol", "initial_precision"): 1
source
HierarchicalGaussianFiltering.premade_categorical_3levelMethod
premade_categorical_3level(config::Dict; verbose::Bool = true)

The categorical 3 level HGF model, which takes an input from one of n categories and learns the probability of a category appearing. It has one categorical input node u, with a categorical value parent xcat. The categorical node has a binary value parent xbinn for each category n, each of which has a continuous value parent xprobn. Finally, all of these continuous nodes share a continuous volatility parent xvol. Setting parameter values for xbin and xprob sets that parameter value for each of the xbinn and xprobn nodes.

Config defaults:

  • "n_categories": 4
  • ("xprob", "volatility"): -2
  • ("xvol", "volatility"): -2
  • ("xbin", "xprob", "coupling_strength"): 1
  • ("xprob", "xvol", "coupling_strength"): 1
  • ("xprob", "initial_mean"): 0
  • ("xprob", "initial_precision"): 1
  • ("xvol", "initial_mean"): 0
  • ("xvol", "initial_precision"): 1
source
HierarchicalGaussianFiltering.premade_categorical_state_transitionsMethod
premade_categorical_state_transitions(config::Dict; verbose::Bool = true)

The categorical state transition 3 level HGF model, learns state transition probabilities between a set of n categorical states. It has one categorical input node u, with a categorical value parent xcatn for each of the n categories, representing which category was transitioned from. Each categorical node then has a binary parent xbinnm, representing the category m which the transition was towards. Each binary node xbinnm has a continuous parent xprobnm. Finally, all of these continuous nodes share a continuous volatility parent xvol. Setting parameter values for xbin and xprob sets that parameter value for each of the xbinnm and xprobn_m nodes.

This HGF has five shared parameters: "xprobvolatility" "xprobinitialprecisions" "xprobinitialmeans" "couplingstrengthsxbinxprob" "couplingstrengthsxprob_xvol"

Config defaults:

- "n_categories": 4
- ("xprob", "volatility"): -2
- ("xvol", "volatility"): -2
- ("xbin", "xprob", "coupling_strength"): 1
- ("xprob", "xvol", "coupling_strength"): 1
- ("xprob", "initial_mean"): 0
- ("xprob", "initial_precision"): 1
- ("xvol", "initial_mean"): 0
- ("xvol", "initial_precision"): 1
source
HierarchicalGaussianFiltering.premade_continuous_2levelMethod
premade_continuous_2level(config::Dict; verbose::Bool = true)

The standard 2 level continuous HGF, which filters a continuous input. It has a continous input node u, with a single value parent x, which in turn has a single volatility parent xvol.

Config defaults:

  • ("u", "input_noise"): -2
  • ("x", "volatility"): -2
  • ("xvol", "volatility"): -2
  • ("u", "x", "coupling_strength"): 1
  • ("x", "xvol", "coupling_strength"): 1
  • ("x", "initial_mean"): 0
  • ("x", "initial_precision"): 1
  • ("xvol", "initial_mean"): 0
  • ("xvol", "initial_precision"): 1
source
HierarchicalGaussianFiltering.premade_hgfFunction
premade_hgf(model_name::String, config::Dict = Dict(); verbose = true)

Create an HGF from the list of premade HGFs.

Arguments

  • 'model_name::String': Name of the premade HGF. Returns a list of possible model names if set to 'help'.
  • 'config::Dict = Dict()': A dictionary with configurations for the HGF, like parameters and settings.
  • 'verbose::Bool = true': If set to false, warnings are hidden.
source
HierarchicalGaussianFiltering.update_hgf!Method
update_hgf!(
    hgf::HGF,
    inputs::Union{
        Real,
        Missing,
        Vector{<:Union{Real,Missing}},
        Dict{String,<:Union{Real,Missing}},
    },
)

Update all nodes in an HGF based on an input. The input can either be missing, a single value, a vector of values, or a dictionary of input node names and corresponding values.

source

This page was generated using Literate.jl.