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

Add StatsBase.predict to the interface

Open sethaxen opened this issue 2 years ago • 8 comments

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.

sethaxen avatar Feb 25 '23 16:02 sethaxen

Bump, maybe @devmotion or @torfjelde?

sethaxen avatar Mar 08 '23 13:03 sethaxen

Bump again.

sethaxen avatar Mar 24 '23 14:03 sethaxen

@sunxd3 can help backport this to v0.5 once merged.

It would be great to update DynamicPPL to support [email protected] thought.

yebai avatar Mar 25 '23 19:03 yebai

I can try and help bring DynamicPPL up to AbstractPPL 0.6, what exactly break in 0.6 from 0.5 @yebai @torfjelde ?

sunxd3 avatar Mar 25 '23 21:03 sunxd3

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

yebai avatar Mar 26 '23 00:03 yebai

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.

codecov[bot] avatar Nov 08 '23 15:11 codecov[bot]

@torfjelde @sunxd3 @penelopeysm, anything missing here? If not, can we push to merge this?

yebai avatar Sep 19 '24 11:09 yebai

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)

sunxd3 avatar Sep 19 '24 11:09 sunxd3