AbstractPPL.jl
AbstractPPL.jl copied to clipboard
Add StatsBase.predict to the interface
As suggested in https://github.com/TuringLang/DynamicPPL.jl/issues/466#issuecomment-1436670214, this PR adds StatsBase.predict
to the API with a default implementation.
Bump, maybe @devmotion or @torfjelde?
Bump again.
@sunxd3 can help backport this to v0.5
once merged.
It would be great to update DynamicPPL
to support [email protected]
thought.
I can try and help bring DynamicPPL
up to AbstractPPL 0.6
, what exactly break in 0.6
from 0.5
@yebai @torfjelde ?
@sunxd3 It is related to changing behavior of the colon syntax. You can follow this issue https://github.com/TuringLang/DynamicPPL.jl/pull/440 and the issues it linked.
We can discuss this more in our next meeting.
Codecov Report
Attention: 8 lines
in your changes are missing coverage. Please review.
Comparison is base (
b342b3d
) 84.82% compared to head (7862931
) 80.39%. Report is 5 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #81 +/- ##
==========================================
- Coverage 84.82% 80.39% -4.44%
==========================================
Files 3 3
Lines 145 153 +8
==========================================
Hits 123 123
- Misses 22 30 +8
Files | Coverage Δ | |
---|---|---|
src/abstractprobprog.jl | 40.00% <0.00%> (-45.72%) |
:arrow_down: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@torfjelde @sunxd3 @penelopeysm, anything missing here? If not, can we push to merge this?
as far as I can tell, we can introduce fix
to AbstractPPL, and use it for predict
.
On a higher level, we can also add predict(model, vector_of_params_and_weights)
and support some kind of importance sampling so when predict, we don't need to go over all the posterior samples.
(I need to finish https://github.com/TuringLang/DynamicPPL.jl/pull/651)