chemometrics.mcr.constraint.CutBelow

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

Bases: chemometrics.mcr._constraint._CutExclude

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

The values of an array are set to zero, if they are below a certain threshold. This implies that the values may afterwards be further from the threshold than before. A typical example where this functionality may be interesting is, if peaks should be localized and the interaction between different components minimized. Additionally, 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)

Initialize

Methods

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

Initialize

transform(A)

Apply cut-below value constraint

transform(A)

Apply cut-below value constraint