PropertiesTransfer

class PropertiesTransfer[source]

Model to transfer rock properties using Nearest Neighbors algorithm.

dump(path)[source]

Dump to a file (*.npz).

Parameters

path (str or pathlib.Path) – Path to file, .npz extension will be appended to the file name if it is not already there.

fit(original_grid, new_grid, n_neighbors=5, normalize_vector=(1, 1, 1))[source]

Fit Nearest Neighbors model.

Parameters
  • original_grid (geology.Grid) – Original grid.

  • new_grid (geology.Grid) – New grid.

  • n_neighbors (int, optional) – number of neighbors to use, by default 5.

  • normalize_vector (list, optional) – vector to normalize distance, by default [1, 1, 1].

get_params(deep=True)

Get parameters for this estimator.

Parameters

deep (boolean, optional) – If True, will return the parameters for this estimator and contained subobjects that are estimators.

Returns

params – Parameter names mapped to their values.

Return type

mapping of string to any

load(path)[source]

Load from file.

Parameters

path (str or pathlib.Path) – File path.

predict(original_properties, aggr=<function PropertiesTransfer.<lambda>>)[source]

Transfer property values to the new grid.

Parameters
  • original_properties (numpy.ndarray) – Properties on original grid.

  • aggr (Callable, optional) – Function to aggregate nearest neighbors values, by default weighted average.

Returns

array – New values.

Return type

ndarray

set_params(**params)

Set the parameters of this estimator.

The method works on simple estimators as well as on nested objects (such as pipelines). The latter have parameters of the form <component>__<parameter> so that it’s possible to update each component of a nested object.

Returns

Return type

self