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

Change likelihood defaults #1985

Merged
merged 8 commits into from
May 2, 2023
Merged

Conversation

awav
Copy link
Member

@awav awav commented Sep 25, 2022

PR type: bugfix / enhancement

Summary

GPflow had a feature of setting the minimal positive value using gpflow.config.set_default_positive_minimum. Recently, the default minimum boundary for positive values in scalar likelihoods has been changed to in module global variable with fixed value. That introduced a couple of issues:

  • New approach created confusion around positive_minimum config value, as it was supposed to control all positive values in the GPflow package.
  • Default global value in likelihoods module creates another way of controlling behaviour of GPflow package. config was supposed to be a single controlling centre.

This PR introduces likelihoods_positive_minimum in config that controls positive values in scalar likelihoods.

PR checklist

  • New features: code is well-documented
    • detailed docstrings (API documentation)
    • notebook examples (usage demonstration)
  • The bug case / new feature is covered by unit tests
  • Code has type annotations
  • Build checks
    • I ran the black isort formatter (make format)
    • I locally tested that the tests pass (make check-all)
  • Release management
    • RELEASE.md updated with entry for this change
    • New contributors: I've added myself to CONTRIBUTORS.md

Copy link
Member

@jesnie jesnie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -37,6 37,7 @@
* ``GPFLOW_FLOAT``: "float16", "float32", or "float64"
* ``GPFLOW_POSITIVE_BIJECTOR``: "exp" or "softplus"
* ``GPFLOW_POSITIVE_MINIMUM``: Any positive float number
* ``LIKELIHOODS_POSITIVE_MINIMUM``: Any positive float number
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably prepend GPFLOW_ for consistency with the above...

Suggested change
* ``LIKELIHOODS_POSITIVE_MINIMUM``: Any positive float number
* ``GPFLOW_LIKELIHOODS_POSITIVE_MINIMUM``: Any positive float number

@codecov
Copy link

codecov bot commented Apr 27, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: 0.09 🎉

Comparison is base (f4904ec) 98.06% compared to head (68084e8) 98.16%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1985       /-   ##
===========================================
  Coverage    98.06%   98.16%    0.09%     
===========================================
  Files           97       97              
  Lines         5437     5458       21     
===========================================
  Hits          5332     5358       26     
  Misses         105      100       -5     
Impacted Files Coverage Δ
gpflow/config/__init__.py 100.00% <ø> (ø)
gpflow/config/__config__.py 100.00% <100.00%> ( 3.54%) ⬆️
gpflow/likelihoods/scalar_continuous.py 99.32% <100.00%> ( 0.01%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@awav
Copy link
Member Author

awav commented May 2, 2023

With plural likelihoods or singular likelihood. LGTM.

@khurram-ghani khurram-ghani merged commit efade00 into develop May 2, 2023
@khurram-ghani khurram-ghani deleted the awav/likelihoods-positive-minimum branch May 2, 2023 12:54
@khurram-ghani khurram-ghani mentioned this pull request May 3, 2023
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.

3 participants