MultivariateRegression Type

Contains method common for all multivariate regressions.

Explanation of variables common to all methods:

NumberOfPoints: Number of measurements for calibration. Each measurement is represented by a spectrum X (or set of independent variables) and a set of corresponding concentrations Y (or dependent variables)

NumberOfX: Number of spectral values (or number of independent variables).

NumberOfY: Number of concentrations (or number of dependent variables).

NumberOfFactors: Number of main components used for prediction or calculation.

X: Matrix of spectra( or independent variables). The spectra are horizontal oriented, i.e. one spectra is a row in the X matrix.

Y: Matrix of concentration (or dependent variables). One set of concentrations is also represented by one row in the matrix.

XU: Matrix of unknown spectra (or independent variables) used for prediction of the Y variables.

SpectralRegions: If the spectra consists of more than one regions, these regions should be preprocessed separately. To designate them, one has to provide an array of ascending integer values. Each element of this region designates the starting index of a spectral region.

Constructors

Constructor Description

MultivariateRegression()

Full Usage: MultivariateRegression()

Instance members

Instance member Description

this.AnalyzeFromPreprocessed

Full Usage: this.AnalyzeFromPreprocessed

Parameters:
    matrixX : IROMatrix<float> - The spectral matrix (each spectrum is a row in the matrix). They must at least be centered.
    matrixY : IROMatrix<float> - The matrix of concentrations (each experiment is a row in the matrix). They must at least be centered.
    maxFactors : int - Maximum number of factors for analysis.

Creates an analyis from preprocessed spectra and preprocessed concentrations.

matrixX : IROMatrix<float>

The spectral matrix (each spectrum is a row in the matrix). They must at least be centered.

matrixY : IROMatrix<float>

The matrix of concentrations (each experiment is a row in the matrix). They must at least be centered.

maxFactors : int

Maximum number of factors for analysis.

this.AnalyzeFromRaw

Full Usage: this.AnalyzeFromRaw

Parameters:
    preprocessOptions : SpectralPreprocessingOptions - Information how to preprocess the data.
    spectralRegions : int[] - Array of ascending indices representing the starting indices of spectral regions.
    matrixX : IMatrix<float> - Matrix of preprocessed spectra (number of observations, number of wavelengths).
    matrixY : IMatrix<float> - Matrix of preprocessed y values (number of observations, number of y).
    maxFactors : int - Maximum number of factors to calculate.

Creates an analyis from the raw spectra and raw concentrations.

preprocessOptions : SpectralPreprocessingOptions

Information how to preprocess the data.

spectralRegions : int[]

Array of ascending indices representing the starting indices of spectral regions.

matrixX : IMatrix<float>

Matrix of preprocessed spectra (number of observations, number of wavelengths).

matrixY : IMatrix<float>

Matrix of preprocessed y values (number of observations, number of y).

maxFactors : int

Maximum number of factors to calculate.

this.AnalyzeFromRaw

Full Usage: this.AnalyzeFromRaw

Parameters:
    preprocessOptions : SpectralPreprocessingOptions - Information how to preprocess the data.
    xOfX : IReadOnlyList<float> - The spectral x variable (e.g. frequencies, wavelength).
    matrixX : IMatrix<float> - Matrix of preprocessed spectra (number of observations, number of wavelengths).
    matrixY : IMatrix<float> - Matrix of preprocessed y values (number of observations, number of y).
    maxFactors : int - Maximum number of factors to calculate.

Creates an analyis from the raw spectra and raw concentrations.

preprocessOptions : SpectralPreprocessingOptions

Information how to preprocess the data.

xOfX : IReadOnlyList<float>

The spectral x variable (e.g. frequencies, wavelength).

matrixX : IMatrix<float>

Matrix of preprocessed spectra (number of observations, number of wavelengths).

matrixY : IMatrix<float>

Matrix of preprocessed y values (number of observations, number of y).

maxFactors : int

Maximum number of factors to calculate.

this.CalibrationModel

Full Usage: this.CalibrationModel

Returns: IMultivariateCalibrationModel
Modifiers: abstract

Returns the calibration model of the analysis.

Returns: IMultivariateCalibrationModel

this.GetPRESSFromPreprocessed

Full Usage: this.GetPRESSFromPreprocessed

Parameters:
    matrixX : IROMatrix<float> - The preprocessed spectra.

Returns: IROVector<float> The PRESS vector.
Modifiers: abstract

Returns the predicted error sum of squares (PRESS) for this analysis. The length of the vector returned is the number of factors in the analysis plus one.

matrixX : IROMatrix<float>

The preprocessed spectra.

Returns: IROVector<float>

The PRESS vector.

this.GetPredictionScores

Full Usage: this.GetPredictionScores

Parameters:
    numberOfFactors : int - Number of factors used for calculation.

Returns: IROMatrix<float> The prediction score matrix. This matrix has the dimensions (NumberOfX, NumberOfY).
Modifiers: abstract

Calculates the prediction scores.

numberOfFactors : int

Number of factors used for calculation.

Returns: IROMatrix<float>

The prediction score matrix. This matrix has the dimensions (NumberOfX, NumberOfY).

this.GetXLeverageFromPreprocessed

Full Usage: this.GetXLeverageFromPreprocessed

Parameters:
    matrixX : IROMatrix<float> - Matrix of spectra (a spectrum = a row in the matrix).
    numFactors : int - Number of factors used for calculation.

Returns: IROMatrix<float> Matrix of spectral leverages. Normally, this is a (NumberOfPoints,1) matrix, with exception of PLS1, where it is a (NumberOfPoints,NumberOfY) matrix.
Modifiers: abstract

Calculates the spectral leverage from preprocessed spectra.

matrixX : IROMatrix<float>

Matrix of spectra (a spectrum = a row in the matrix).

numFactors : int

Number of factors used for calculation.

Returns: IROMatrix<float>

Matrix of spectral leverages. Normally, this is a (NumberOfPoints,1) matrix, with exception of PLS1, where it is a (NumberOfPoints,NumberOfY) matrix.

this.GetXLeverageFromRaw

Full Usage: this.GetXLeverageFromRaw

Parameters:
    preprocessOptions : SpectralPreprocessingOptions -
    matrixX : IMatrix<float> - Matrix of spectra (a spectrum = a row in the matrix).
    numFactors : int - Number of factors used for calculation.

Returns: IROMatrix<float> Matrix of spectral leverages. Normally, this is a (NumberOfPoints,1) matrix, with exception of PLS1, where it is a (NumberOfPoints,NumberOfY) matrix.
Modifiers: abstract

Calculates the spectral leverage from raw spectra.

preprocessOptions : SpectralPreprocessingOptions

matrixX : IMatrix<float>

Matrix of spectra (a spectrum = a row in the matrix).

numFactors : int

Number of factors used for calculation.

Returns: IROMatrix<float>

Matrix of spectral leverages. Normally, this is a (NumberOfPoints,1) matrix, with exception of PLS1, where it is a (NumberOfPoints,NumberOfY) matrix.

this.GetXLeverageFromRaw

Full Usage: this.GetXLeverageFromRaw

Parameters:
    matrixX : IMatrix<float> - Matrix of spectra (a spectrum = a row in the matrix).
    numFactors : int - Number of factors used for calculation.

Returns: IROMatrix<float> Matrix of spectral leverages. Normally, this is a (NumberOfPoints,1) matrix, with exception of PLS1, where it is a (NumberOfPoints,NumberOfY) matrix.
Modifiers: abstract

Calculates the spectral leverage from raw spectra.

matrixX : IMatrix<float>

Matrix of spectra (a spectrum = a row in the matrix).

numFactors : int

Number of factors used for calculation.

Returns: IROMatrix<float>

Matrix of spectral leverages. Normally, this is a (NumberOfPoints,1) matrix, with exception of PLS1, where it is a (NumberOfPoints,NumberOfY) matrix.

this.InternalCalibrationModel

Full Usage: this.InternalCalibrationModel

Returns: MultivariateCalibrationModel
Modifiers: abstract

Returns the calibration model of the analysis.

Returns: MultivariateCalibrationModel

this.NumberOfFactors

Full Usage: this.NumberOfFactors

Returns: int

Returns the number of factors calculated during the analysis.

Returns: int

this.NumberOfSpectralResiduals

Full Usage: this.NumberOfSpectralResiduals

Returns: int
Modifiers: abstract

This returns the number of spectral residuals. This is normally 1, but for the PLS1 analyis, it is the NumberOfY.

Returns: int

this.PredictYFromPreprocessed

Full Usage: this.PredictYFromPreprocessed

Parameters:
    XU : IROMatrix<float> - Matrix of unknown spectra (preprocessed the same way as the calibration spectra).
    numFactors : int - Number of factors used for prediction.
    predictedY : IMatrix<float> - On return, holds the predicted y values. (They are centered).

Modifiers: abstract

This predicts concentrations of unknown spectra.

XU : IROMatrix<float>

Matrix of unknown spectra (preprocessed the same way as the calibration spectra).

numFactors : int

Number of factors used for prediction.

predictedY : IMatrix<float>

On return, holds the predicted y values. (They are centered).

this.PredictYFromPreprocessed

Full Usage: this.PredictYFromPreprocessed

Parameters:
    XU : IROMatrix<float> - Matrix of unknown spectra (preprocessed the same way as the calibration spectra).
    numFactors : int - Number of factors used for prediction.

Returns: IROMatrix<float> The predicted y values. (They are centered).
Modifiers: abstract

This predicts concentrations of unknown spectra.

XU : IROMatrix<float>

Matrix of unknown spectra (preprocessed the same way as the calibration spectra).

numFactors : int

Number of factors used for prediction.

Returns: IROMatrix<float>

The predicted y values. (They are centered).

this.PredictYFromRaw

Full Usage: this.PredictYFromRaw

Parameters:
    XU : IMatrix<float> - Matrix of spectra used for prediction (number of spectra, number of wavelengths).
    numFactors : int - Number of factors used for prediction.
    predictedY : IMatrix<float> - In return, holds the predicted y values. You have to provide a matrix of dimensions (number of spectra, number of y).

Predicts y values from raw (unpreprocessed) spectra.

XU : IMatrix<float>

Matrix of spectra used for prediction (number of spectra, number of wavelengths).

numFactors : int

Number of factors used for prediction.

predictedY : IMatrix<float>

In return, holds the predicted y values. You have to provide a matrix of dimensions (number of spectra, number of y).

this.PredictedYAndSpectralResidualsFromPreprocessed

Full Usage: this.PredictedYAndSpectralResidualsFromPreprocessed

Parameters:
    XU : IROMatrix<float> - Spectra (horizontally oriented).
    numFactors : int - Number of factors used for calculation.
    predictedY : IMatrix<float> - On return, holds the predicted y values. (They are centered).
    spectralResiduals : IMatrix<float> - On return, holds the spectral residual values.

Modifiers: abstract

This calculates the spectral residuals.

XU : IROMatrix<float>

Spectra (horizontally oriented).

numFactors : int

Number of factors used for calculation.

predictedY : IMatrix<float>

On return, holds the predicted y values. (They are centered).

spectralResiduals : IMatrix<float>

On return, holds the spectral residual values.

this.PredictedYAndSpectralResidualsFromPreprocessed

Full Usage: this.PredictedYAndSpectralResidualsFromPreprocessed

Parameters:
    XU : IROMatrix<float> - Spectra (horizontally oriented).
    numFactors : int - Number of factors used for calculation.
    predictedY : byref<IMatrix<float>> - On return, holds the predicted y values. (They are centered). If the matrix you provide has not the appropriate dimensions, it is reallocated.
    spectralResiduals : byref<IMatrix<float>> - On return, holds the spectral residual values. If the matrix you provide has not the appropriate dimensions, it is reallocated.

Modifiers: abstract

This calculates the spectral residuals. The matrices are reallocated if they don't have the appropriate dimensions.

XU : IROMatrix<float>

Spectra (horizontally oriented).

numFactors : int

Number of factors used for calculation.

predictedY : byref<IMatrix<float>>

On return, holds the predicted y values. (They are centered). If the matrix you provide has not the appropriate dimensions, it is reallocated.

spectralResiduals : byref<IMatrix<float>>

On return, holds the spectral residual values. If the matrix you provide has not the appropriate dimensions, it is reallocated.

this.PredictedYAndSpectralResidualsFromPreprocessed

Full Usage: this.PredictedYAndSpectralResidualsFromPreprocessed

Parameters:
    XU : IROMatrix<float> - Spectra (horizontally oriented).
    numFactors : int - Number of factors used for calculation.
    calculatePredictedY : bool - If true, the predictedY is calculated. Otherwise, predictedY is null on return.
    predictedY : byref<IMatrix<float>> - On return, holds the predicted y values. (They are centered). If the matrix you provide has not the appropriate dimensions, it is reallocated.
    calculateSpectralResiduals : bool - If true, the spectral residuals are calculated. Otherwise spectralResiduals is null on return.
    spectralResiduals : byref<IMatrix<float>> - On return, holds the spectral residual values. If the matrix you provide has not the appropriate dimensions, it is reallocated.

Modifiers: abstract

This calculates the spectral residuals. The matrices are reallocated if they don't have the appropriate dimensions.

XU : IROMatrix<float>

Spectra (horizontally oriented).

numFactors : int

Number of factors used for calculation.

calculatePredictedY : bool

If true, the predictedY is calculated. Otherwise, predictedY is null on return.

predictedY : byref<IMatrix<float>>

On return, holds the predicted y values. (They are centered). If the matrix you provide has not the appropriate dimensions, it is reallocated.

calculateSpectralResiduals : bool

If true, the spectral residuals are calculated. Otherwise spectralResiduals is null on return.

spectralResiduals : byref<IMatrix<float>>

On return, holds the spectral residual values. If the matrix you provide has not the appropriate dimensions, it is reallocated.

this.Reset

Full Usage: this.Reset

Modifiers: abstract

Resets the regression, so that it appears like newly created.

this.SetCalibrationModel

Full Usage: this.SetCalibrationModel

Parameters:
    calib : IMultivariateCalibrationModel - The calibration set for use in the analysis. The provided calibration model have to correspond to the type of analysis.

Modifiers: abstract

This sets the calibration model data of the analysis to the provided data. This can be used to set back previously stored calibration data for use in the prediction functions.

calib : IMultivariateCalibrationModel

The calibration set for use in the analysis. The provided calibration model have to correspond to the type of analysis.

this.SpectralResidualsFromPreprocessed

Full Usage: this.SpectralResidualsFromPreprocessed

Parameters:
    XU : IROMatrix<float> - Spectra (horizontally oriented).
    numFactors : int - Number of factors used for calculation.
    spectralResiduals : IMatrix<float> - On return, holds the spectral residual values.

Modifiers: abstract

This calculates the spectral residuals.

XU : IROMatrix<float>

Spectra (horizontally oriented).

numFactors : int

Number of factors used for calculation.

spectralResiduals : IMatrix<float>

On return, holds the spectral residual values.

this.SpectralResidualsFromPreprocessed

Full Usage: this.SpectralResidualsFromPreprocessed

Parameters:
    XU : IROMatrix<float> - Spectra (horizontally oriented).
    numFactors : int - Number of factors used for calculation.

Returns: IROMatrix<float> The calculated spectral residuals.
Modifiers: abstract

This calculates the spectral residuals.

XU : IROMatrix<float>

Spectra (horizontally oriented).

numFactors : int

Number of factors used for calculation.

Returns: IROMatrix<float>

The calculated spectral residuals.

Static members

Static member Description

MultivariateRegression.CrossValidationIteration(X, Y, groupingStrategy, crossFunction)

Full Usage: MultivariateRegression.CrossValidationIteration(X, Y, groupingStrategy, crossFunction)

Parameters:
Returns: float The mean number of spectra that was used for prediction.

This function separates the spectra into a bunch of spectra used for calibration and the rest of spectra used for prediction. This separation is repeated until all spectra are used exactly one time for prediction.

X : IROMatrix<float>

Matrix of spectra (horizontal oriented).

Y : IROMatrix<float>

Matrix of y values.

groupingStrategy : ICrossValidationGroupingStrategy

The strategy how to separate the spectra into the calibration and prediction spectra.

crossFunction : CrossValidationIterationFunction

The function that is called for each separation.

Returns: float

The mean number of spectra that was used for prediction.

MultivariateRegression.GetCrossPRESS(spectralRegions, X, Y, numFactors, groupingStrategy, preprocessOptions, regress, crossPRESS)

Full Usage: MultivariateRegression.GetCrossPRESS(spectralRegions, X, Y, numFactors, groupingStrategy, preprocessOptions, regress, crossPRESS)

Parameters:
    spectralRegions : int[] - Array of ascending indices representing the starting indices of spectral regions.
    X : IROMatrix<float> - Matrix of spectra (a spectrum = a row in the matrix).
    Y : IROMatrix<float> - Matrix of y values (e.g. concentrations).
    numFactors : int - Maximum number of factors to calculate the cross PRESS for.
    groupingStrategy : ICrossValidationGroupingStrategy - The strategy how to group the spectra for cross prediction.
    preprocessOptions : SpectralPreprocessingOptions - Information how to preprocess the data.
    regress : MultivariateRegression - The type of regression (e.g. PCR, PLS1, PLS2) provided as an empty regression object.
    crossPRESS : byref<IROVector<float>> - The vector of CROSS press values. Note that this vector has the length numFactor+1.

Returns: float The mean number of spectra used for prediction.

Get the cross predicted error sum of squares for the number of factors=0...numFactors.

spectralRegions : int[]

Array of ascending indices representing the starting indices of spectral regions.

X : IROMatrix<float>

Matrix of spectra (a spectrum = a row in the matrix).

Y : IROMatrix<float>

Matrix of y values (e.g. concentrations).

numFactors : int

Maximum number of factors to calculate the cross PRESS for.

groupingStrategy : ICrossValidationGroupingStrategy

The strategy how to group the spectra for cross prediction.

preprocessOptions : SpectralPreprocessingOptions

Information how to preprocess the data.

regress : MultivariateRegression

The type of regression (e.g. PCR, PLS1, PLS2) provided as an empty regression object.

crossPRESS : byref<IROVector<float>>

The vector of CROSS press values. Note that this vector has the length numFactor+1.

Returns: float

The mean number of spectra used for prediction.

MultivariateRegression.GetCrossPRESS(xOfX, X, Y, numFactors, groupingStrategy, preprocessOptions, regress, crossPRESS)

Full Usage: MultivariateRegression.GetCrossPRESS(xOfX, X, Y, numFactors, groupingStrategy, preprocessOptions, regress, crossPRESS)

Parameters:
    xOfX : IReadOnlyList<float> - The spectral wavelength values corresponding to the spectral bins.
    X : IROMatrix<float> - Matrix of spectra (a spectrum = a row in the matrix).
    Y : IROMatrix<float> - Matrix of y values (e.g. concentrations).
    numFactors : int - Maximum number of factors to calculate the cross PRESS for.
    groupingStrategy : ICrossValidationGroupingStrategy - The strategy how to group the spectra for cross prediction.
    preprocessOptions : SpectralPreprocessingOptions - Information how to preprocess the data.
    regress : MultivariateRegression - The type of regression (e.g. PCR, PLS1, PLS2) provided as an empty regression object.
    crossPRESS : byref<IROVector<float>> - The vector of CROSS press values. Note that this vector has the length numFactor+1.

Returns: float The mean number of spectra used for prediction.

Get the cross predicted error sum of squares for the number of factors=0...numFactors.

xOfX : IReadOnlyList<float>

The spectral wavelength values corresponding to the spectral bins.

X : IROMatrix<float>

Matrix of spectra (a spectrum = a row in the matrix).

Y : IROMatrix<float>

Matrix of y values (e.g. concentrations).

numFactors : int

Maximum number of factors to calculate the cross PRESS for.

groupingStrategy : ICrossValidationGroupingStrategy

The strategy how to group the spectra for cross prediction.

preprocessOptions : SpectralPreprocessingOptions

Information how to preprocess the data.

regress : MultivariateRegression

The type of regression (e.g. PCR, PLS1, PLS2) provided as an empty regression object.

crossPRESS : byref<IROVector<float>>

The vector of CROSS press values. Note that this vector has the length numFactor+1.

Returns: float

The mean number of spectra used for prediction.

MultivariateRegression.GetCrossXResiduals(spectralRegions, X, Y, numFactors, groupingStrategy, preprocessOptions, regress, crossXResiduals)

Full Usage: MultivariateRegression.GetCrossXResiduals(spectralRegions, X, Y, numFactors, groupingStrategy, preprocessOptions, regress, crossXResiduals)

Parameters:
    spectralRegions : int[] - Array of ascending indices representing the starting indices of spectral regions.
    X : IROMatrix<float> - Matrix of spectra (a spectrum = a row in the matrix).
    Y : IROMatrix<float> - Matrix of y values (e.g. concentrations).
    numFactors : int - Number of factors used for calculation.
    groupingStrategy : ICrossValidationGroupingStrategy - The strategy how to group the spectra for cross prediction.
    preprocessOptions : SpectralPreprocessingOptions - Information how to preprocess the data.
    regress : MultivariateRegression - The type of regression (e.g. PCR, PLS1, PLS2) provided as an empty regression object.
    crossXResiduals : byref<IROMatrix<float>> - Returns the matrix of spectral residuals

Returns: float Mean number of spectra used for prediction.

Calculates the spectral residuals obtained from cross validation.

spectralRegions : int[]

Array of ascending indices representing the starting indices of spectral regions.

X : IROMatrix<float>

Matrix of spectra (a spectrum = a row in the matrix).

Y : IROMatrix<float>

Matrix of y values (e.g. concentrations).

numFactors : int

Number of factors used for calculation.

groupingStrategy : ICrossValidationGroupingStrategy

The strategy how to group the spectra for cross prediction.

preprocessOptions : SpectralPreprocessingOptions

Information how to preprocess the data.

regress : MultivariateRegression

The type of regression (e.g. PCR, PLS1, PLS2) provided as an empty regression object.

crossXResiduals : byref<IROMatrix<float>>

Returns the matrix of spectral residuals

Returns: float

Mean number of spectra used for prediction.

MultivariateRegression.GetCrossXResiduals(xOfX, X, Y, numFactors, groupingStrategy, preprocessOptions, regress, crossXResiduals)

Full Usage: MultivariateRegression.GetCrossXResiduals(xOfX, X, Y, numFactors, groupingStrategy, preprocessOptions, regress, crossXResiduals)

Parameters:
    xOfX : IReadOnlyList<float> - The spectral wavelength values corresponding to the spectral bins.
    X : IROMatrix<float> - Matrix of spectra (a spectrum = a row in the matrix).
    Y : IROMatrix<float> - Matrix of y values (e.g. concentrations).
    numFactors : int - Number of factors used for calculation.
    groupingStrategy : ICrossValidationGroupingStrategy - The strategy how to group the spectra for cross prediction.
    preprocessOptions : SpectralPreprocessingOptions - Information how to preprocess the data.
    regress : MultivariateRegression - The type of regression (e.g. PCR, PLS1, PLS2) provided as an empty regression object.
    crossXResiduals : byref<IROMatrix<float>> - Returns the matrix of spectral residuals

Returns: float Mean number of spectra used for prediction.

Calculates the spectral residuals obtained from cross validation.

xOfX : IReadOnlyList<float>

The spectral wavelength values corresponding to the spectral bins.

X : IROMatrix<float>

Matrix of spectra (a spectrum = a row in the matrix).

Y : IROMatrix<float>

Matrix of y values (e.g. concentrations).

numFactors : int

Number of factors used for calculation.

groupingStrategy : ICrossValidationGroupingStrategy

The strategy how to group the spectra for cross prediction.

preprocessOptions : SpectralPreprocessingOptions

Information how to preprocess the data.

regress : MultivariateRegression

The type of regression (e.g. PCR, PLS1, PLS2) provided as an empty regression object.

crossXResiduals : byref<IROMatrix<float>>

Returns the matrix of spectral residuals

Returns: float

Mean number of spectra used for prediction.

MultivariateRegression.GetCrossYPredicted(spectralRegions, X, Y, numFactors, groupingStrategy, preprocessOptions, regress, yCrossPredicted)

Full Usage: MultivariateRegression.GetCrossYPredicted(spectralRegions, X, Y, numFactors, groupingStrategy, preprocessOptions, regress, yCrossPredicted)

Parameters:
    spectralRegions : int[] - Array of ascending indices representing the starting indices of spectral regions.
    X : IROMatrix<float> - Matrix of spectra (a spectrum = a row in the matrix).
    Y : IROMatrix<float> - Matrix of y values (e.g. concentrations).
    numFactors : int - Number of factors used for calculation.
    groupingStrategy : ICrossValidationGroupingStrategy - The strategy how to group the spectra for cross prediction.
    preprocessOptions : SpectralPreprocessingOptions - Information how to preprocess the data.
    regress : MultivariateRegression - The type of regression (e.g. PCR, PLS1, PLS2) provided as an empty regression object.
    yCrossPredicted : IMatrix<float> - Matrix of cross predicted y values. Must be of same dimension as the Y matrix.

Returns: float Mean number of spectra used for cross prediction.

Calculates the cross predicted y values.

spectralRegions : int[]

Array of ascending indices representing the starting indices of spectral regions.

X : IROMatrix<float>

Matrix of spectra (a spectrum = a row in the matrix).

Y : IROMatrix<float>

Matrix of y values (e.g. concentrations).

numFactors : int

Number of factors used for calculation.

groupingStrategy : ICrossValidationGroupingStrategy

The strategy how to group the spectra for cross prediction.

preprocessOptions : SpectralPreprocessingOptions

Information how to preprocess the data.

regress : MultivariateRegression

The type of regression (e.g. PCR, PLS1, PLS2) provided as an empty regression object.

yCrossPredicted : IMatrix<float>

Matrix of cross predicted y values. Must be of same dimension as the Y matrix.

Returns: float

Mean number of spectra used for cross prediction.

MultivariateRegression.GetCrossYPredicted(xOfX, X, Y, numFactors, groupingStrategy, preprocessOptions, regress, yCrossPredicted)

Full Usage: MultivariateRegression.GetCrossYPredicted(xOfX, X, Y, numFactors, groupingStrategy, preprocessOptions, regress, yCrossPredicted)

Parameters:
    xOfX : IReadOnlyList<float> - The spectral wavelength values corresponding to the spectral bins.
    X : IROMatrix<float> - Matrix of spectra (a spectrum = a row in the matrix).
    Y : IROMatrix<float> - Matrix of y values (e.g. concentrations).
    numFactors : int - Number of factors used for calculation.
    groupingStrategy : ICrossValidationGroupingStrategy - The strategy how to group the spectra for cross prediction.
    preprocessOptions : SpectralPreprocessingOptions - Information how to preprocess the data.
    regress : MultivariateRegression - The type of regression (e.g. PCR, PLS1, PLS2) provided as an empty regression object.
    yCrossPredicted : IMatrix<float> - Matrix of cross predicted y values. Must be of same dimension as the Y matrix.

Returns: float Mean number of spectra used for cross prediction.

Calculates the cross predicted y values.

xOfX : IReadOnlyList<float>

The spectral wavelength values corresponding to the spectral bins.

X : IROMatrix<float>

Matrix of spectra (a spectrum = a row in the matrix).

Y : IROMatrix<float>

Matrix of y values (e.g. concentrations).

numFactors : int

Number of factors used for calculation.

groupingStrategy : ICrossValidationGroupingStrategy

The strategy how to group the spectra for cross prediction.

preprocessOptions : SpectralPreprocessingOptions

Information how to preprocess the data.

regress : MultivariateRegression

The type of regression (e.g. PCR, PLS1, PLS2) provided as an empty regression object.

yCrossPredicted : IMatrix<float>

Matrix of cross predicted y values. Must be of same dimension as the Y matrix.

Returns: float

Mean number of spectra used for cross prediction.

MultivariateRegression.PostprocessY(matrixY, meanY, scaleY)

Full Usage: MultivariateRegression.PostprocessY(matrixY, meanY, scaleY)

Parameters:
    matrixY : IMatrix<float> - Matrix of (centered) y values. On return, contains the uncentered y values.
    meanY : IReadOnlyList<float> - Vector of mean y value(s).
    scaleY : IReadOnlyList<float> - Vector of y scale value(s).

This calculates from the predicted (but still centered) y values the raw y values.

matrixY : IMatrix<float>

Matrix of (centered) y values. On return, contains the uncentered y values.

meanY : IReadOnlyList<float>

Vector of mean y value(s).

scaleY : IReadOnlyList<float>

Vector of y scale value(s).

MultivariateRegression.PostprocessY(calib, matrixY)

Full Usage: MultivariateRegression.PostprocessY(calib, matrixY)

Parameters:
    calib : IMultivariatePreprocessingModel - Contains the calibration data (mean y and scale y).
    matrixY : IMatrix<float> - Matrix of (centered) y values. On return, contains the uncentered y values.

This calculates from the predicted (but still centered) y values the raw y values.

calib : IMultivariatePreprocessingModel

Contains the calibration data (mean y and scale y).

matrixY : IMatrix<float>

Matrix of (centered) y values. On return, contains the uncentered y values.

MultivariateRegression.PreprocessForAnalysis(preprocessOptions, spectralRegions, matrixX, matrixY, meanX, scaleX, meanY, scaleY)

Full Usage: MultivariateRegression.PreprocessForAnalysis(preprocessOptions, spectralRegions, matrixX, matrixY, meanX, scaleX, meanY, scaleY)

Parameters:
    preprocessOptions : SpectralPreprocessingOptions - Information how to preprocess the data.
    spectralRegions : int[] - Array of ascending indices representing the starting indices of spectral regions.
    matrixX : IMatrix<float> -
    matrixY : IMatrix<float> -
    meanX : byref<IVector<float>> -
    scaleX : byref<IVector<float>> -
    meanY : byref<IVector<float>> -
    scaleY : byref<IVector<float>> -

Preprocesses the x and y matrices before usage in multivariate calibrations.

preprocessOptions : SpectralPreprocessingOptions

Information how to preprocess the data.

spectralRegions : int[]

Array of ascending indices representing the starting indices of spectral regions.

matrixX : IMatrix<float>

matrixY : IMatrix<float>

meanX : byref<IVector<float>>

scaleX : byref<IVector<float>>

meanY : byref<IVector<float>>

scaleY : byref<IVector<float>>

MultivariateRegression.PreprocessForAnalysis(preprocessOptions, xOfX, matrixX, matrixY, meanX, scaleX, meanY, scaleY)

Full Usage: MultivariateRegression.PreprocessForAnalysis(preprocessOptions, xOfX, matrixX, matrixY, meanX, scaleX, meanY, scaleY)

Parameters:

Preprocesses the x and y matrices before usage in multivariate calibrations.

preprocessOptions : SpectralPreprocessingOptions

Information how to preprocess the data.

xOfX : IReadOnlyList<float>

matrixX : IMatrix<float>

matrixY : IMatrix<float>

meanX : byref<IVector<float>>

scaleX : byref<IVector<float>>

meanY : byref<IVector<float>>

scaleY : byref<IVector<float>>

MultivariateRegression.PreprocessForAnalysis(preprocessOptions, spectralRegions, matrixX, matrixY)

Full Usage: MultivariateRegression.PreprocessForAnalysis(preprocessOptions, spectralRegions, matrixX, matrixY)

Parameters:
    preprocessOptions : SpectralPreprocessingOptions - Information how to preprocess the data.
    spectralRegions : int[] - Array of ascending indices representing the starting indices of spectral regions.
    matrixX : IMatrix<float> - Matrix of spectra.
    matrixY : IMatrix<float> - Matrix of concentrations.

Returns: MultivariatePreprocessingModel The collected data about proprocessing.

Preprocesses the x and y matrices before usage in multivariate calibrations.

preprocessOptions : SpectralPreprocessingOptions

Information how to preprocess the data.

spectralRegions : int[]

Array of ascending indices representing the starting indices of spectral regions.

matrixX : IMatrix<float>

Matrix of spectra.

matrixY : IMatrix<float>

Matrix of concentrations.

Returns: MultivariatePreprocessingModel

The collected data about proprocessing.

MultivariateRegression.PreprocessForAnalysis(preprocessOptions, xOfX, matrixX, matrixY)

Full Usage: MultivariateRegression.PreprocessForAnalysis(preprocessOptions, xOfX, matrixX, matrixY)

Parameters:
Returns: MultivariatePreprocessingModel The collected data about proprocessing.

Preprocesses the x and y matrices before usage in multivariate calibrations.

preprocessOptions : SpectralPreprocessingOptions

Information how to preprocess the data.

xOfX : IReadOnlyList<float>

Spectral wavelength values.

matrixX : IMatrix<float>

Matrix of spectra.

matrixY : IMatrix<float>

Matrix of concentrations.

Returns: MultivariatePreprocessingModel

The collected data about proprocessing.

MultivariateRegression.PreprocessSpectraForAnalysis(preprocessOptions, spectralRegions, matrixX, meanX, scaleX)

Full Usage: MultivariateRegression.PreprocessSpectraForAnalysis(preprocessOptions, spectralRegions, matrixX, meanX, scaleX)

Parameters:
    preprocessOptions : SpectralPreprocessingOptions - Contains the information how to preprocess the spectra.
    spectralRegions : int[] - Array of starting indices of spectral regions. Can be set to null.
    matrixX : IMatrix<float> - The matrix of spectra. Each spectrum is a row of the matrix.
    meanX : byref<IVector<float>> -
    scaleX : byref<IVector<float>> -

This will process the spectra before analysis in multivariate calibration.

preprocessOptions : SpectralPreprocessingOptions

Contains the information how to preprocess the spectra.

spectralRegions : int[]

Array of starting indices of spectral regions. Can be set to null.

matrixX : IMatrix<float>

The matrix of spectra. Each spectrum is a row of the matrix.

meanX : byref<IVector<float>>

scaleX : byref<IVector<float>>

MultivariateRegression.PreprocessSpectraForAnalysis(preprocessOptions, xOfX, matrixX, meanX, scaleX)

Full Usage: MultivariateRegression.PreprocessSpectraForAnalysis(preprocessOptions, xOfX, matrixX, meanX, scaleX)

Parameters:

This will process the spectra before analysis in multivariate calibration.

preprocessOptions : SpectralPreprocessingOptions

Contains the information how to preprocess the spectra.

xOfX : IReadOnlyList<float>

matrixX : IMatrix<float>

The matrix of spectra. Each spectrum is a row of the matrix.

meanX : byref<IVector<float>>

scaleX : byref<IVector<float>>

MultivariateRegression.PreprocessSpectraForPrediction(calib, preprocessOptions, matrixX)

Full Usage: MultivariateRegression.PreprocessSpectraForPrediction(calib, preprocessOptions, matrixX)

Parameters:

This will convert the raw spectra (horizontally in matrixX) to preprocessed spectra according to the calibration model.

calib : IMultivariateCalibrationModel

The calibration model containing the instructions to process the spectra.

preprocessOptions : SpectralPreprocessingOptions

Contains the information how to preprocess the spectra.

matrixX : IMatrix<float>

The matrix of spectra. Each spectrum is a row of the matrix.

MultivariateRegression.PreprocessSpectraForPrediction(calib, matrixX)

Full Usage: MultivariateRegression.PreprocessSpectraForPrediction(calib, matrixX)

Parameters:

Preprocess the raw spectra for prediction (use the preprocess data from the analysis).

calib : IMultivariatePreprocessingModel

The preprocessing data.

matrixX : IMatrix<float>

Matrix of raw spectra. On return, contains the preprocessed spectra.

MultivariateRegression.PreprocessSpectraForPrediction(preprocessOptions, matrixX, meanX, scaleX)

Full Usage: MultivariateRegression.PreprocessSpectraForPrediction(preprocessOptions, matrixX, meanX, scaleX)

Parameters:

This will convert the raw spectra (horizontally in matrixX) to preprocessed spectra according to the calibration model.

preprocessOptions : SpectralPreprocessingOptions

Information how to preprocess the spectra.

matrixX : IMatrix<float>

Matrix of raw spectra. On return, this matrix contains the preprocessed spectra.

meanX : IReadOnlyList<float>

Mean spectrum.

scaleX : IReadOnlyList<float>

Scale spectrum.

MultivariateRegression.PreprocessYForAnalysis(matrixY, meanY, scaleY)

Full Usage: MultivariateRegression.PreprocessYForAnalysis(matrixY, meanY, scaleY)

Parameters:
    matrixY : IMatrix<float> - Matrix of y values. On return, this contains the preprocessed y values.
    meanY : byref<IVector<float>> - On return, contains the mean y value(s).
    scaleY : byref<IVector<float>> - On return, contains the scale value(s).

Preprocess the y values for analysis (mean center, scale currently not used).

matrixY : IMatrix<float>

Matrix of y values. On return, this contains the preprocessed y values.

meanY : byref<IVector<float>>

On return, contains the mean y value(s).

scaleY : byref<IVector<float>>

On return, contains the scale value(s).

MultivariateRegression.PreprocessYForPrediction(matrixY, meanY, scaleY)

Full Usage: MultivariateRegression.PreprocessYForPrediction(matrixY, meanY, scaleY)

Parameters:
    matrixY : IMatrix<float> - The concentration matrix. Constituents are horizontally oriented, different experiments vertically.
    meanY : IReadOnlyList<float> - Vector of concentration mean values.
    scaleY : IReadOnlyList<float> - Vector of concentration scale values.

This centers and scales the y values in exactly the way it was done in the multivariate analysis.

matrixY : IMatrix<float>

The concentration matrix. Constituents are horizontally oriented, different experiments vertically.

meanY : IReadOnlyList<float>

Vector of concentration mean values.

scaleY : IReadOnlyList<float>

Vector of concentration scale values.