Gen.jl icon indicating copy to clipboard operation
Gen.jl copied to clipboard

Add a function to return the individual scores of a selection

Open hsm207 opened this issue 5 years ago • 2 comments

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.

hsm207 avatar May 03 '20 07:05 hsm207

Maybe I'm misunderstanding, but running project three times, one for each single-address selection, should give this.

marcoct avatar May 04 '20 16:05 marcoct

@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).

alex-lew avatar May 04 '20 18:05 alex-lew