Gen.jl
Gen.jl copied to clipboard
Add a function to return the individual scores of a selection
Currently:
project(trace, select((:y, 1), (:y, 2), (:y, 3)))
will return the sum of the scores of (:y, 1), (:y, 2), and (:y, 3).
Can we have a function that will return the individual scores?
This would come in handy when calculating things like WAIC and log pointwise posterior density (LPPD) where we need to produce the distribution of scores for each observation.
Maybe I'm misunderstanding, but running project three times, one for each single-address selection, should give this.
@marcoct I think the idea would be to provide a utility function that did this -- e.g., maybe it could return a choicemap-like trie mapping addresses to their scores?
I've sometimes wanted this when debugging -- I want to see which parts of a trace are contributing how much to the trace's score (and compare across multiple traces).