chemometrics.mcr.constraint.CutAbove

class chemometrics.mcr.constraint.CutAbove(value=0, axis_sumnz=None, exclude=None, exclude_axis=- 1, copy=False)

Bases: _CutExclude

Cut values above (and not-equal to) a certain threshold

The values of an array are set to zero, if they are above a certain threshold. This implies that the values may afterwards be further from the threshold than before. This constraint provides functionalities to exclude sections of the data from being processed.

Parameters
  • value (float) – Cutoff value

  • axis_sumnz ({None, int}) – If not None, cut below value only applied where sum across specified axis does not go to 0, i.e. all values cut.

  • exclude (int, list, tuple, ndarray) – Exclude rows/columns along axis defined by exclude_axis. If an index is listed in exclude, all entries along given exclude_axis are not transformed.

  • exclude_axis (int) – Along which axis entries are excluded. See also exclude

  • copy (bool) – Make copy of input data, A; otherwise, overwrite (if mutable)

__init__(value=0, axis_sumnz=None, exclude=None, exclude_axis=- 1, copy=False)

Methods

__init__([value, axis_sumnz, exclude, ...])

transform(A)

Apply cut-above value constraint

transform(A)

Apply cut-above value constraint