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

SGP Gradients unsupported #583

Open
NAThompson opened this issue Jun 7, 2024 · 1 comment
Open

SGP Gradients unsupported #583

NAThompson opened this issue Jun 7, 2024 · 1 comment

Comments

@NAThompson
Copy link
Contributor

Visualization of the function returned from SGP indicates that this model of the data is indeed differentiable. However, the .gradient method is not defined:

sgp = SGP()
sgp.set_training_values(xs, ys)
sgp.train()
sgp.gradient([1.2, 2.3, 4.6])
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "~venv/lib/python3.12/site-packages/smt/surrogate_models/surrogate_model.py", line 333, in predict_derivatives
    check_support(self, "derivatives")
  File "~venv/lib/python3.12/site-packages/smt/utils/checks.py", line 25, in check_support
    raise NotImplementedError("{} does not support {}".format(class_name, name))
NotImplementedError: SGP does not support derivatives

Are gradient fundamentally unavailable, or could this be implemented?

@relf
Copy link
Member

relf commented Jun 10, 2024

To the best of my knowledge, sparse GP derivatives can be implemented. We just need a PR. 😉

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

No branches or pull requests

2 participants