base
py3dinterpolations.modelling.models.base
¶
Abstract base class for all interpolation models.
BaseModel
¶
Bases: ABC
Interface for interpolation models.
All models must implement fit() and predict() with consistent signatures.
name
abstractmethod
property
¶
Human-readable model name.
fit(x, y, z, v)
abstractmethod
¶
Fit the model to training data.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
ndarray
|
X coordinates of training points. |
required |
y
|
ndarray
|
Y coordinates of training points. |
required |
z
|
ndarray
|
Z coordinates of training points. |
required |
v
|
ndarray
|
Values at training points. |
required |
Source code in py3dinterpolations/modelling/models/base.py
16 17 18 19 20 21 22 23 24 25 26 | |
predict(grid_x, grid_y, grid_z, **kwargs)
abstractmethod
¶
Predict on 1D grid arrays.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
grid_x
|
ndarray
|
1D array of X grid coordinates. |
required |
grid_y
|
ndarray
|
1D array of Y grid coordinates. |
required |
grid_z
|
ndarray
|
1D array of Z grid coordinates. |
required |
Returns:
| Type | Description |
|---|---|
InterpolationResult
|
Interpolation result with at least the interpolated field. |
Source code in py3dinterpolations/modelling/models/base.py
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | |