Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
fsaad opened this issue Jan 14, 2018 · 0 comments
Open

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

fsaad opened this issue Jan 14, 2018 · 0 comments

Comments

@fsaad
Copy link
Collaborator

fsaad commented Jan 14, 2018

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".

@fsaad fsaad changed the title Make default implementation of ``observers'' in VentureScript CGPM vscgpm: make default implementation of ``observers'' Jan 15, 2018
fsaad pushed a commit that referenced this issue Jan 15, 2018
Requries user who overrides one observer to override them all.
Consider using a dictionary for user to override only some observers.
fsaad pushed a commit that referenced this issue Jan 15, 2018
Requries user who overrides one observer to override them all.
Consider using a dictionary for user to override only some observers.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant