py3dinterpolations.modelling.estimator.Estimator
- class py3dinterpolations.modelling.estimator.Estimator(griddata: GridData, params: dict, scoring: str = 'neg_mean_absolute_error', verbose: int = 3)
Bases:
object
class for estimation of model parameters.
Runs a parameter estimation looking for the best scoring method. The scoring attribute can be any of the scoring methods supported by scikit-learn. See https://scikit-learn.org/stable/modules/model_evaluation.html#scoring-parameter
Get the best parameters with the best_params attribute. Get the best score with the best_score attribute. Get the cross validation results with the cv_results attribute.
Verbose level can be set from 0 to 3 to higher level of verbosity.
Note
At the moment only pykrige.Krige is supported.
- Parameters
griddata (GridData) – griddata to interpolate
params (dict) – parameters to search
scoring (str, optional) – scoring method. Defaults to “neg_mean_absolute_error”.
verbose (int, optional) – verbosity level. Defaults to 3.
- estimator
estimator object
- Type
GridSearchCV
- best_params
best parameters
- Type
dict
- best_score
best score
- Type
float
- cv_results
cross validation results, ready to be converted to pandas DataFrame
- Type
dict
Examples
>>> # parameters of 3d kriging, both ordinary and universal >>> params = { >>> "method": ["ordinary3d","universal3d"], >>> "variogram_model": ["linear", "power", "gaussian"], >>> "nlags": [2, 4, 6, 8, 10], >>> "weight": [True, False], >>> }
Methods
__init__
(griddata, params[, scoring, verbose])Attributes