sklearn_model
py3dinterpolations.modelling.models.sklearn_model
¶
Sklearn-compatible model wrapper.
SklearnModel(estimator, model_name='sklearn')
¶
Bases: BaseModel
Wrapper for any sklearn estimator with fit/predict interface.
Handles classifiers (predict_proba) and regressors (predict).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
estimator
|
SklearnEstimator
|
A sklearn estimator instance. |
required |
model_name
|
str
|
Human-readable name for this model. |
'sklearn'
|
Source code in py3dinterpolations/modelling/models/sklearn_model.py
19 20 21 | |
fit(x, y, z, v)
¶
Fit the sklearn estimator.
Source code in py3dinterpolations/modelling/models/sklearn_model.py
23 24 25 26 | |
predict(grid_x, grid_y, grid_z, **kwargs)
¶
Predict on a regular grid.
Returns:
| Type | Description |
|---|---|
InterpolationResult
|
InterpolationResult with shape (len(grid_z), len(grid_y), len(grid_x)) |
InterpolationResult
|
to match the convention of other models. |
Source code in py3dinterpolations/modelling/models/sklearn_model.py
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | |