class liesel.goose.ModelInterface(*args, **kwargs)[source]#

Bases: Protocol

Defines a standardized way for Goose to communicate with a statistical model.

This means predominantly, to update the model state and to compute the log-probability.


extract_position(position_keys, model_state)

Extracts the position from the model state given a sequence of position keys.


Computes the unnormalized log-probability given the model state.

update_state(position, model_state)

Updates the model state with the values in the position.