cosapp.utils.surrogate_models.nn_interpolators.linear_interpolator
Define the LinearInterpolator class.
Classes
LinearInterpolator(training_points, ...[, ...])
|
Interpolate values by forming a hyperplane between the points closest to the prescribed inputs. |
-
class cosapp.utils.surrogate_models.nn_interpolators.linear_interpolator.LinearInterpolator(training_points, training_values, num_leaves=2)[source]
Bases: NNBase
Interpolate values by forming a hyperplane between the points closest to the prescribed inputs.
-
gradient(prediciton_points)[source]
Find the gradient at each location of a set of supplied predicted points.
- Parameters:
prediciton_points (ndarray) – Prediction points at which the gradient is calculated.
- Returns:
Gradient at the prediction points.
- Return type:
ndarray