chemometrics.mcr.constraint.ZeroEndPoints

class chemometrics.mcr.constraint.ZeroEndPoints(axis=- 1, span=1, copy=False)

Bases: Constraint

Enforce the endpoints to be zero

The ZeroEndPoints constraint fits a linear baseline to the data and subtracts the baseline from the data. Each component is handled independently. If a span is given, first span points at each end of the data are averaged and only thereafter, the baseline is calculated and subtracted. The ZeroEndPoints constraint may be useful if we want to prevent MCR from modeling background contributions.

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

  • axis (int) – Axis to operate on

  • span (int) – Number of pixels along the ends to average.

__init__(axis=- 1, span=1, copy=False)

A must be non-negative

Methods

__init__([axis, span, copy])

A must be non-negative

transform(A)

Apply zero endpoints constraint

transform(A)

Apply zero endpoints constraint