Skip to content

SGP Gradients unsupported #583

@NAThompson

Description

@NAThompson

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions