API Reference

This is not an exhaustive list of classes and functions, but rather those most likely to be of interest to users and developer. See Index and Module Index for a full list.

pymcr.condition: Functions to condition / preprocess data

Functions to condition / preprocess data

Functions

pymcr.condition.standardize(X[, mean_ctr, …])

Standardization of data

pymcr.constraints: Built-in constraints

Built-in constraints

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

Classes

pymcr.constraints.ConstraintNonneg([copy])

Non-negativity constraint.

pymcr.constraints.ConstraintCumsumNonneg([…])

Cumulative-Summation non-negativity constraint. All negative

pymcr.constraints.ConstraintZeroEndPoints([…])

Enforce the endpoints (or the mean over a range) is zero

pymcr.constraints.ConstraintZeroCumSumEndPoints([…])

Enforce the endpoints of the cumsum (or the mean over a range) is near-zero.

pymcr.constraints.ConstraintNorm([axis, …])

Normalization constraint.

pymcr.constraints.ConstraintReplaceZeros([…])

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.

pymcr.constraints.ConstraintCutBelow([…])

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

pymcr.constraints.ConstraintCompressBelow([…])

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

pymcr.constraints.ConstraintCutAbove([…])

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

pymcr.constraints.ConstraintCompressAbove([…])

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

pymcr.constraints.ConstraintPlanarize(…[, …])

Set a particular target to a plane

pymcr.mcr: MCR Main Class for Computation

MCR Main Class for Computation

Classes

pymcr.mcr.McrAR([c_regr, st_regr, …])

Multivariate Curve Resolution - Alternating Regression

pymcr.metrics: Metrics used in pyMCR

Metrics used in pyMCR

All functions must take C, ST, D_actual, D_calculated

Functions

pymcr.metrics.mse(C, ST, D_actual, D_calculated)

Mean square error

pymcr.regressors: Built-in regression methods

Built-in least squares / regression methods.

All models will follow the formalism, AX = B, solve for X.

NOTE: coef_ will be X.T, which is the formalism that scikit-learn follows

Classes

pymcr.regressors.LinearRegression()

Abstract class for linear regression methods

pymcr.regressors.OLS(*args, **kwargs)

Ordinary least squares regression

pymcr.regressors.NNLS(*args, **kwargs)

Non-negative constrained least squares regression