Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify inference for predictions functionality #51

Merged
merged 35 commits into from
Sep 19, 2023
Merged

Modify inference for predictions functionality #51

merged 35 commits into from
Sep 19, 2023

Conversation

albertpod
Copy link
Member

This PR aims at bringing the prediction functionality into RxInfer.jl.

src/inference.jl Outdated Show resolved Hide resolved
@albertpod albertpod self-assigned this Feb 15, 2023
@albertpod albertpod linked an issue Feb 15, 2023 that may be closed by this pull request
@albertpod
Copy link
Member Author

Short summary of the modifications:

  • The functions make_actor have been modified to accept AbstractVariable instead of RandomVariable.
  • The InferenceResult struct has been expanded to include a new field named predictions.
  • New functions __inference_check_dataismissing, __inference_fill_predictions have been added to handle predictions.
  • The inference function has been updated to handle predictions.
  • The data argument is now optional if predictvars are specified.
  • New logic has been added to handle prediction variables.
  • Subscription logic has been updated to handle both types of variables.
  • Several error checks and warnings have been added or modified to ensure that the data and prediction variables are correctly specified and handled.

@albertpod
Copy link
Member Author

albertpod commented Sep 12, 2023

NOTE:
The prediction functionality doesn't allow free energy computation at the moment.
I have error when free_energy and predictions are both present.
The research question remains: how do we compute FE on non-terminated graph (ping @ismailsenoz )

@albertpod albertpod marked this pull request as ready for review September 13, 2023 16:19
test/test_inference.jl Show resolved Hide resolved
src/inference.jl Show resolved Hide resolved
src/inference.jl Outdated Show resolved Hide resolved
src/inference.jl Outdated Show resolved Hide resolved
src/inference.jl Outdated Show resolved Hide resolved
test/test_inference.jl Outdated Show resolved Hide resolved
@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@codecov
Copy link

codecov bot commented Sep 19, 2023

Codecov Report

Patch coverage: 76.71% and project coverage change: -0.29% ⚠️

Comparison is base (2ba4dea) 81.32% compared to head (c309034) 81.03%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #51      +/-   ##
==========================================
- Coverage   81.32%   81.03%   -0.29%     
==========================================
  Files          11       11              
  Lines        1210     1271      +61     
==========================================
+ Hits          984     1030      +46     
- Misses        226      241      +15     
Files Changed Coverage Δ
src/inference.jl 75.77% <74.60%> (+0.07%) ⬆️
src/model.jl 85.85% <90.00%> (+0.14%) ⬆️

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bvdmitri bvdmitri merged commit d16cfb5 into main Sep 19, 2023
6 of 8 checks passed
@bvdmitri bvdmitri deleted the dev-predict branch September 19, 2023 11:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Predictive posterior distributions
2 participants