spectrochempy.NNLS

class NNLS(**kwargs)[source]

Least-squares solution to a linear matrix equation with non-negativity constraints.

This is a wrapper to the scipy.optimize.nnls` function.

Parameters
  • *datasets (one or two |NDDataset|’s or array-like objects) – If a single dataset Y is provided, the X data will be the x coordinates of the Y dataset, or the index of the data if not coordinates exists. If two datasets X, and Y are given, the x coordinates of Y are ignored and replaced by the X data.

  • maxiter (int, optional) – Maximum number of iterations, optional. Default is 3 * X.shape.

Methods

NNLS.inverse_transform()

Return the reconstructed data from the A and B least-square coefficients.

NNLS.itrans()

Return the reconstructed data from the A and B least-square coefficients.

NNLS.trans()

Return the least square coefficients A and B.

NNLS.transform()

Return the least square coefficients A and B.