nearest_neighbor.py¶
-
class
openmdao.surrogate_models.nearest_neighbor.
NearestNeighbor
(interpolant_type='rbf', **kwargs)[source]¶ Bases:
openmdao.surrogate_models.surrogate_model.SurrogateModel
Surrogate model that approximates values using a nearest neighbor approximation. interpolant_type argument must be one of ‘linear’, ‘weighted’, or ‘rbf’.
Args: interpolant_type : str
One of ‘linear’, ‘weighted’, or ‘rbf’. Determines the type of interpolant used.
kwargs :
Additional keyword arguments to be passed to the constructor for the interpolant.
-
linearize
(x, **kwargs)[source]¶ Calculates the jacobian of the interpolant at the requested point.
Args: x : array-like
Point at which the surrogate Jacobian is evaluated.
kwargs :
Additional keyword arguments passed to the interpolant.
-