Skip to content

Commit

Permalink
Improve hypothesis strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
AVHopp committed May 6, 2024
1 parent 5c5364c commit 7862ab3
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions tests/hypothesis_strategies/kernels.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,20 @@
matern_kernels = st.builds(
MaternKernel,
nu=st.sampled_from((0.5, 1.5, 2.5)),
lengthscale_prior=st.one_of(st.none(), priors),
lengthscale_prior=priors,
lengthscale_prior_initial_value=st.floats(min_value=0, exclude_min=True),
)
"""A strategy that generates Matern kernels."""
"""A strategy that generates matern kernels."""

base_kernels = matern_kernels

base_kernels = st.one_of([matern_kernels])
"""A strategy that generates base kernels to be used within more complex kernels."""

scale_kernels = st.builds(
ScaleKernel,
base_kernel=base_kernels,
outputscale_prior=st.one_of(st.none(), priors),
outputscale_prior=priors,
outputscale_prior_initial_value=st.floats(min_value=0, exclude_min=True),
)
"""A strategy that generates scale kernels."""

Expand Down

0 comments on commit 7862ab3

Please sign in to comment.