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

[BUG] Does not work with models that have a different Bayesian Network Structure/Number of variables #4

Open
Wh0DKnee opened this issue Jan 28, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@Wh0DKnee
Copy link

Wh0DKnee commented Jan 28, 2022

Description

The project only works for models with a specific Bayesian Network structure with seven parameters. For example, it does not work with the glider_v1p2.txt model, as there are only five variables in the model.

Reproducibility

Create an ini file for the input that uses the glider_v1p2.txt model, use that ini file in RUN_DAA_EncounterModelTool_serial.m as the "parameterFile".

A bunch of asserts will fire. When commenting out the asserts, an error will occur because the startDefault variable in line 48 in generateDAAEncounterSet.m has hard-coded dimensions (7), which doesn't match the glider model.

Expectation

Should work with any model.

Files

em-pairing-uncor-importancesampling\Encounter_Generation_Tool\generateDAAEncounterSet.m
em-pairing-uncor-importancesampling\RUN_DAAEncounterModelTool_serial.m
em-pairing-uncor-importancesampling\Encounter_Generation_Tool\checkEncounterModelInputs.m

Fix

I've created a fork with a hack as a fix (hardcoded so that it works with models that only have 5 random variables): Fork

@Wh0DKnee Wh0DKnee added the bug Something isn't working label Jan 28, 2022
@Wh0DKnee Wh0DKnee changed the title [BUG] [BUG] Does not work with models that have a different Bayesian Network Structure/Number of variables Jan 28, 2022
@Wh0DKnee
Copy link
Author

Wh0DKnee commented Feb 2, 2022

Update: I also believe that lines 85 and 131 in generateDAAEncounterSet.m do not work for other models. As I understand it, the indices in "idxZeroBoundaries" correspond to the hard-coded random variables of the model. I am not 100% sure though.

@aweinert-MIT
Copy link
Member

idzZeroBoundaries specifies how model variables are sampled. Either the index of the variable bin (e.g. L = 1) is return or a value sampled within the desired bin (e.g. L = 200)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants