src.utils.ftransf.minmax_normalizer

Classes

MinmaxNormalizer(**kwargs)

class src.utils.ftransf.minmax_normalizer.MinmaxNormalizer(**kwargs)
Author:

Alberto M. Esmoris Pena

Class for transforming features by subtracting the min and dividing by the range, i.e., the difference between max and min. Min-max normalized features will be in \([0, 1]\).

Let \(x'\) be a min-max normalized version of the feature \(x \in X\) where X is the set representing the feature’s value for many points. Thus, the min-max normalized feature can be computed as:

\[x' = \dfrac{x - \min X}{\max X - \min X}\]
Variables:
  • minmax (list or None) – When given, it is expected to be a list of lists. Each i-th element of the first list is a pair of two elements such that the first one gives the min for the i-th feature and the second one gives the max for the i-th feature.

  • frenames ((list of str) or None) – When given, the normalized features will be stored in the point cloud with these names.

  • target_range (np.ndarray) – The (a, b) interval such that features will be normalized to be inside (a, b). By default, it is (0, 1).

  • clip (bool) – Whether to clip potential values from held-out data to respect the normalization interval (True) or not (False).

static extract_ftransf_args(spec)

Extract the arguments to initialize/instantiate a MinmaxNormalizer.

Parameters:

spec – The key-word specification containing the arguments.

Returns:

The arguments to initialize/instantiate a MinmaxNormalizer.

__init__(**kwargs)

Initialize/instantiate a MinmaxNormalizer.

Parameters:

kwargs – The attributes for the MinmaxNormalizer.

transform(F, y=None, fnames=None, out_prefix=None)

The fundamental feature transform logic defining the MinmaxNormalizer.

See FeatureTransformer and feature_transformer.FeatureTransformer.transform().

get_names_of_transformed_features(**kwargs)

See FeatureTransformer and feature_transformer.FeatureTransformer.get_names_of_transformed_features()

build_new_las_header(pcloud)

See feature_transformer.FeatureTransformer.build_new_las_header().