Extend CRP to Pitman Yor and make hyper-parameters Loom compatible#256
Open
Schaechtle wants to merge 3 commits intozane/hardcode-versionfrom
Open
Extend CRP to Pitman Yor and make hyper-parameters Loom compatible#256Schaechtle wants to merge 3 commits intozane/hardcode-versionfrom
Schaechtle wants to merge 3 commits intozane/hardcode-versionfrom
Conversation
This is taking code from Joao's branch - and modifies it so all tests pass.
Collaborator
|
Use |
Joaoloula
reviewed
Jul 15, 2024
Joaoloula
left a comment
There was a problem hiding this comment.
Looks good to me, barring the structure_hypers=scalar in the tests.
| if not cu.check_env_debug(): | ||
| return | ||
| assert self.alpha() > 0. | ||
| assert self.crp.hypers['alpha'] > 0. |
There was a problem hiding this comment.
You might want to also check that the discount is between 0 and 1 (optionally, you could change the alpha check to the more permissive > -discount, even though given cgpm and loom's grid, we'll never enter the negative regime.
| multiprocess=multiprocess, | ||
| outputs=outputs, | ||
| alpha=1., | ||
| structure_hypers=1., |
There was a problem hiding this comment.
Maybe this should be a dict with alpha and discount as keys?
| X=data, | ||
| outputs=outputs, | ||
| alpha=1., | ||
| structure_hypers=1., |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What does this do?
Extends the CRP to a Pitman-Yor Process and uses Loom-style hyper-parameter grids for inference; using and modifying code from this branch but ensuring all tests pass again.
Why do we want this?
We're using CGPM in combination with Loom for structure learning. Here we use for initial inference CGPM for clean-up with fully Bayesian inference. Currently, that process is wasteful because we discard all hyper-parameters.
How was this tested?
The test suite was modified so that all CRP tests pass for Pitman-Yor with discount parameter = 0.
This PR is best-reviewed commit-by-commit.