step_measure_mcr_als() creates a specification of a recipe step that
applies Multivariate Curve Resolution - Alternating Least Squares (MCR-ALS)
to multi-dimensional measurement data.
Usage
step_measure_mcr_als(
recipe,
...,
n_components = 3L,
max_iter = 500L,
tol = 1e-06,
non_negativity = TRUE,
unimodality = FALSE,
prefix = "mcr_",
role = "predictor",
trained = FALSE,
skip = FALSE,
id = recipes::rand_id("measure_mcr_als")
)Arguments
- recipe
A recipe object.
- ...
One or more selector functions to choose measure columns. If empty, all nD measure columns are used.
- n_components
Number of components to extract. Default is 3.
- max_iter
Maximum number of iterations. Default is 500.
- tol
Convergence tolerance. Default is 1e-6.
- non_negativity
Logical. Should non-negativity constraints be applied? Default is
TRUE.- unimodality
Logical. Should unimodality constraints be applied? Default is
FALSE.- prefix
Prefix for output column names. Default is
"mcr_".- role
Not used.
- trained
Logical indicating if the step has been trained.
- skip
Logical. Should the step be skipped when baking?
- id
Unique step identifier.
Details
MCR-ALS is a powerful technique for resolving mixtures into pure component contributions. It's particularly useful for:
Chromatographic data (time x wavelength)
Spectroscopic mixtures
Process analytical data
Unlike PARAFAC, MCR-ALS is a bilinear method that works on 2D data (samples unfolded if 3D). It allows flexible constraints like non-negativity and unimodality.
Note
This is an experimental feature. The implementation uses a simple ALS algorithm without advanced constraints. For production use, consider using dedicated MCR-ALS packages.
See also
step_measure_parafac() for PARAFAC decomposition
Other measure-multiway:
step_measure_parafac(),
step_measure_tucker()