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

Add expected improvement utility function #460

Merged

Conversation

Thomas-Christie
Copy link
Contributor

Type of changes

  • Bug fix
  • New feature
  • Documentation / docstrings
  • Tests
  • Other

Checklist

  • [] I've formatted the new code by running poetry run pre-commit run --all-files --show-diff-on-failure before committing.
  • I've added tests for new code.
  • I've added docstrings for the new code.

Description

  • Adds expected improvement acquisition function.
  • Removes no longer necessary warning filters from tests.

Issue Number: #459

"""
key = jr.key(42)
f = lambda x: 2.0 * jnp.sin(3 * x) + 0.5 * x
return jr.poisson(key, jnp.exp(f(x)))
return jnp.float64(jr.poisson(key, jnp.exp(f(x))))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Must this be float64? If the user is using float32 arrays (ill-advised, but possible), then this will cause mixed precision errors. Can we perhaps wrap in a jnp.asarray()?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Have switched back to returning an array of integers, as these are samples from a Poisson distribution.

@thomaspinder thomaspinder merged commit b69be96 into JaxGaussianProcesses:main Jul 16, 2024
11 checks passed
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.

2 participants