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] Outdated prior 'constant' set in em_sample.m #44

Open
reliable-nranganathan opened this issue Mar 12, 2022 · 1 comment
Open

[BUG] Outdated prior 'constant' set in em_sample.m #44

reliable-nranganathan opened this issue Mar 12, 2022 · 1 comment
Assignees
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@reliable-nranganathan
Copy link

Description

When sampling a correlated model with em_sample.m, line 50 sets the prior to 'constant', which is not recognized by bn_dirichlet_prior.m, and results in a terminal exception "Unknown prior of constant, if char expecting prior = 'dbe'".

Reproducibility

Running
em_sample('cor_v2p1.txt')
should result in the exception.

Expectation

Changing line 50 in em_sample.m parms.prior = 'constant' to parms.prior='dbe' should resolve the issue and produce hte expected functionality.

Environment

Debian 10, MATLAB R2021a

@reliable-nranganathan reliable-nranganathan added the bug Something isn't working label Mar 12, 2022
@aweinert-MIT aweinert-MIT self-assigned this Mar 12, 2022
@aweinert-MIT aweinert-MIT added this to To do in General Development via automation Mar 12, 2022
@aweinert-MIT
Copy link
Member

This bug was introduced when we first committed the OOP definitions for the EncounterModel superclass and UncorEncounterModel class (commit 8bb3572). This bug was not caught during testing for commit 8bb3572 because the default functionality in the EncounterModel class sets the prior to 0 and the CorTerminalModel class either sets the prior to 0 or via the setTransitionPriors function.

In commit 8bb3572, bn_dirichlet_prior was updated to look for 'dbe' instead of 'constant' because we felt 'dbe' was more descriptive than the generic term, 'constant'.

The recommended fix by @reliable-nranganathan should resolve this bug.

@aweinert-MIT aweinert-MIT added the good first issue Good for newcomers label Mar 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
Development

No branches or pull requests

2 participants