Bug fix while using different params for different instruments for fp
, p
and p1
#112
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi @nespinoza,
The current version of
juliet
(master
anddev
branches, which I believe is the latest stable version) has a bug. While fitting for different parameters forfp
,p
andp1
for different instruments, the sampling will happen only for the last instruments in the list. For example, while fitting forfp_p1_instrument1
andfp_p1_instrument2
, the sampling will happen only for the later parameter and the prior would return as posterior for the former.This is because of a missing
if
statement while creatingself.fp_iname
,self.p_iname
andself.p1_iname
dictionaries in__init__
function of themodel
class (see, changes below to see what I mean). Because of this missingif
statement, thoseself.fp_iname[p1][ins]
etc. dictionaries were kept updating for eachins
in the loop and the final value ofself.fp_iname[p1][ins]
would always correspond to the last instrument in the loop. This PR fixes this issue by adding anif
statement. Let me know if you have any questions on this.Cheers,
Jayshil