chemometrics.mcr.constraint

McrAR constraints

All classes need a transform method. Note, unlike sklearn, transform can copy or overwrite input depending on copy attribute.

Classes

CompressAbove([value, copy])

Compress values above (and not-equal to) a certain threshold (set to value)

CompressBelow([value, copy])

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

Constraint([copy])

Abstract class for constraints

CumsumNonneg([axis, copy])

Cumulative-Summation non-negativity constraint

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

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

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

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

Nonneg([copy])

Non-negativity constraint.

Normalizer([axis, fix, copy])

Normalization constraint.

ReplaceZeros([axis, feature, fval, copy])

Samples that sum-to-zero across axis are replaced with a vector of 0's except for a 1 at feature if a single value.

Unimodal([copy, columns])

Enforce column-wise unimodality of data.

ZeroCumSumEndPoints([nodes, axis, copy])

Enforce certain points in cumulative sum to be near-zero.

ZeroEndPoints([axis, span, copy])

Enforce the endpoints to be zero