py3dinterpolations.modelling.modeler.Modeler

class py3dinterpolations.modelling.modeler.Modeler(griddata: GridData, grid3d: Grid3D, model_name: str = 'ordinary_kriging', model_params: dict = {})

Bases: object

modeler class for 3d modelling

This class applies a model defined within the ModelWrapper class to a Grid3D instance

Currently supports:
Statistical:
  • Ordinary Kriging : ordinary_kriging (pykrige)

Deterministic:
  • Inverse Distance Weighting : idw

Parameters
  • griddata (GridData) – GridData istance

  • grid3d (Grid3D) – Grid3D istance

  • model_name (str) – model name, default ordinary_kriging

  • model_params (dict) – model parameters

griddata

GridData istance

Type

GridData

grid3d

Grid3D istance

Type

Grid3D

model

model object

Type

object

results

dictionary with interpolated and variance grids

Type

dict

Examples

>>> # modeler
>>> modeler = Modeler(griddata, grid3d)
>>> # predict
>>> interpolated = modeler.predict()

Methods

__init__(griddata, grid3d[, model_name, ...])

predict(**kwargs)

makes predictions considering all past preprocessing

Attributes

model

results

predict(**kwargs) ndarray

makes predictions considering all past preprocessing

  • if normalization was applied, predict on normalized grid

  • if standardized data, reverse standardization

  • reshape from zxy to xyz (pykrige output)

Parameters

grids_arrays (dict) – dictionary with x, y, z grids 1d np.ndarray

Returns

interpolated grid

Return type

interpolated (np.ndarray)