Skip to content

vscgpm: make default implementation of ``observers'' #240

@fsaad

Description

@fsaad

Currently, the user is expected to provide a list in the inference language named observers which contains the observation function for each simulator defined the simulators list (which lives in the modelling language).

The default pattern for the observation functions looks like:

define obs_cluster_id = (rowid, apogee, perigee, value, label) -> {
    $label: observe sim_cluster_id( $rowid, $apogee, $perigee) = atom(value);
};

whereas a custom observation function might be:

define obs_period = (rowid, apogee, perigee, value, label) -> {
    let theoretical_period = run(sample keplers_law($apogee, $perigee));
    obs_error( rowid, apogee, perigee, value - theoretical_period, label); };

The first pattern can and should be fully automated by the vscgpm wrapper. The user can then "override" the default observation by defining a dictionary mapping output index to desired observer function, e.g.

assume simulators = [sim_period, sim_cluster_id, sim_error]
...
let observers = dict([0, obs_period])

The above code tells vscgpm that the observer for output index 0 (i.e. sim_period) is the obs_period procedure, whereas sim_cluster_id and sim_error should be observed using the "default pattern".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions