-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Gp sigma parameterize 6094 #6145
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
Gp sigma parameterize 6094 #6145
Conversation
Previous tests work on my end with the expect warnings. Working through specific tests soon for warnings |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #6145 +/- ##
==========================================
+ Coverage 91.93% 93.02% +1.09%
==========================================
Files 101 91 -10
Lines 20948 20752 -196
==========================================
+ Hits 19258 19305 +47
+ Misses 1690 1447 -243
|
The implementation should be at the point initially described. Namely,
Think the tests are in a fine place as well. Was thinking of having one to compare the model parameters with the Noticed a failing test on one of the windows runs from before. Don't know too much about that at the moment. It doesn't seem related to the changes I've made at first glance. Not sure if anyone has thoughts here. |
Thanks for the contribution! I think from a user standpoint, it makes sense to have all functions take For some background, the previous reason why one GP implementation was That said, while it makes sense to have more simplicity for users to input |
Hi @wd60622 Thank you for the PR, and thanks @bwengals for the comments. I will have a look in more details at this on tomorrow afternoon. Also, sorry for my late response! |
Great. Thank you both for taking a look. I will make the adjustments a bit later today |
@bwengals Changes implemented. Went with |
This looks great! For the decorator, for using |
Yup, correct. Still Just waiting on these tests and will decode any fails when they are done. They have been successful in my the local checks. |
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.
Hi, thanks @wd60622
Look good to me. I just add a couple of small comments for clarification.
if (sigma is None and noise is None) or (sigma is not None and noise is not None): | ||
raise ValueError("'sigma' argument must be specified.") |
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.
Hi, just want to understand the logic: If sigma is not None and noise is not None
, should we raise this error, as we already specified sigma
in this case?
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.
Maybe, the logic here could be:
if `sigma is not None`: good
else:
if `noise is not None`: raise warning
else: raise error.
OR
if `sigma is None`:
if `noise is None`: raise error
else: raise warning
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.
If both sigma
and noise
are specified, it is not really wrong, right? :) The user just provides more inputs than what is needed.
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.
I hear what you are staying but thought it might be fine to nudge them toward the new input. Not likely for both to be used, but thought being explicit about the intended behavior would be best instead of throwing away or checking the two parameters silently.
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.
If the user passes in sigma=0.1 and noise=0.2, it's not really possible from the outside to know which value is going to be used in the model. The user must be a bit confused then, and an error message would help them out. Both your alternatives for doing the logic make sense to me too though @danhphan, but I think it also makes sense how it is.
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.
Well said @bwengals That's what I had in mind.
Was trying to make it easier from the developer's point of view
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.
Hi, thanks @wd60622 and @bwengals for the clarification. Total agree with "nudge users toward the new sigma" :)
Function input values. | ||
given: dict | ||
Can optionally take as key value pairs: `X`, `y`, `noise`, | ||
Can optionally take as key value pairs: `X`, `y`, |
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.
Do we need to replace noise
by sigma
here?
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.
This was for the latent class that doesn't use noise. I believe this was a mistake to begin with. Let me know if I am wrong
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.
Yes @wd60622 you are right! thanks to you both for catching this I didn't notice it....
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.
Great, thanks for pointing it out :)
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.
Many thanks @wd60622 for the contribution!
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.
LGTM
What is this PR about?
Addressing the issue raised: #6094
Helps migrates toward standardized API for noise in GPs. Changes the
noise
parameter tosigma
where applicable. AFutureWarning
is used ifnoise
parameter is still used in the previous locations.Checklist
Major / Breaking Changes
Bugfixes / New features
Docs / Maintenance
sigma
parameter instead ofnoise
noise