Class ComparableDiscreteSystem<TShared, TInternal, TData>

Implementation of ComparableSystem for discrete systems, for use with generators which support comparison to data.

Type Parameters

  • TShared

    Values which are shared between all particles in a group and are not mutated by them - the model parameter values for that group

  • TInternal

    Internal state values which can be mutated by generators, used to improve efficiency of the system by e.g. caching calculation results for use by other particles.

  • TData

    Type of each data point which will be compared with system state.

Hierarchy (View Summary)

Implements

Constructors

Accessors

Methods

  • Compares the state of all particles in the syatem with observed data, and returns an NdArray of log likelihoods of each particle state given the data, where the NdArray has shape [nGroups, nParticles]

    Parameters

    • data: TData | TData[]

      Observed data to compare against system state

    Returns NdArray<any[]>

  • Updates shared (parameter) values for all groups in the system.

    Parameters

    • newShared: TShared[]

      Updated parameter values. The length must match the existing number of groups in the system.

    Returns void