Bugfix for #6143, flakey K-means test in GP submodule #6157
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.
closes #6143.
One of the tests of the GP model tests that the kmeans method for locating inducing points works correctly. It uses an example that should be easy for K-means, a 1d normal mixture model, with mu at -5 and the other at 5, both with sigma=1. Occasionally the tests give an answer that is close enough, like [-4.98, 5.1], but doesn't pass the tests. This PR uses a 5% relative tolerance instead.
Checklist
Major / Breaking Changes
Bugfixes / New features
tests/gp/test_util.py::TestKmeansInducing::test_kmeans
#6143Docs / Maintenance