constraint: Class for MCR-ALS constraint

View source: R/constraints.R

constraintR Documentation

Class for MCR-ALS constraint

Description

Class for MCR-ALS constraint

Usage

constraint(name, params = NULL, method = NULL)

Arguments

name

short text with name for the constraint

params

a list with parameters for the constraint method (if NULL - default parameters will be used)

method

method to call when applying the constraint, provide it only for user defined constraints

Details

Use this class to create constraints and add them to a list for MCR-ALS curve resuliton (see mcrals). Either provide name and parameters to one of the existing constraint implementations or make your own. See the list of implemented constraints by running constraints()

For your own constraint you need to create a method, which takes matrix with values (either spectra or contributions being resolved) as the first argument, does something and then return a matrix with the same dimension as the result. The method can have any number of optional parameters.

See help for mcrals or Bookdown tutorial for details.


mdatools documentation built on Sept. 11, 2024, 7:59 p.m.