-
Notifications
You must be signed in to change notification settings - Fork 107
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
Update run_inference_algorithm
to split initial_position
and initial_state
#672
Merged
junpenglao
merged 17 commits into
blackjax-devs:main
from
reubenharry:inference_algorithm
May 20, 2024
Merged
Changes from 15 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
5eeb3e1
UPDATE DOCSTRING
reubenharry 4a09156
ADD STREAMING VERSION
reubenharry dbab9a3
UPDATE TESTS
reubenharry 5bd2a3f
ADD DOCSTRING
reubenharry 4fc1453
ADD TEST
reubenharry 49410f9
REFACTOR RUN_INFERENCE_ALGORITHM
reubenharry ffdca93
UPDATE DOCSTRING
reubenharry b7b7084
Precommit
reubenharry 97cfc9e
CLEAN TESTS
reubenharry 6bd5ab1
ADD INITIAL_POSITION
reubenharry 5615261
FIX TEST
reubenharry d66a561
Merge branch 'main' into inference_algorithm
reubenharry 290addc
Merge branch 'main' into inference_algorithm
reubenharry 178b452
RENAME O
reubenharry 9c1c816
Merge branch 'inference_algorithm' of github.com:reubenharry/blackjax…
reubenharry 9f2af3e
FIX DOCSTRING
reubenharry 5702957
PUT EXPECTATION AFTER TRANSFORM
reubenharry File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we combine the kwargs of
transform
andexpectation
for now? Otherwise we need a better name forexpectation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
expectation
seems to me like an appropriate name, since indeed the value calculated is the expectation. For example, ifexpectation=lambda x: x**2
, then you get backBy contrast,
transform
operates on the full history of samples. In the future, I think it would make sense for it to also take Info, so that the user can choose to dispense with (part of) the diagnostic info. That is why I thought it was better to keep them separate.I think it would in theory be possible to make them the same, if necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That makes sense, but looking at the implementation, the return state is always
transform(state)
, which means for a expectation transformation, we should probably doexpectation(transform(x))
?