Click or drag to resize

MultivariateRegression Class

Contains method common for all multivariate regressions.
Inheritance Hierarchy

Namespace: Altaxo.Calc.Regression.Multivariate
Assembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax
C#
public abstract class MultivariateRegression

The MultivariateRegression type exposes the following members.

Constructors
 NameDescription
Protected methodMultivariateRegressionInitializes a new instance of the MultivariateRegression class
Top
Properties
 NameDescription
Public propertyCalibrationModel Returns the calibration model of the analysis.
Protected propertyInternalCalibrationModel Returns the calibration model of the analysis.
Public propertyNumberOfFactors Returns the number of factors calculated during the analysis.
Public propertyNumberOfSpectralResiduals This returns the number of spectral residuals. This is normally 1, but for the PLS1 analyis, it is the NumberOfY.
Top
Methods
 NameDescription
Public methodAnalyzeFromPreprocessed Creates an analyis from preprocessed spectra and preprocessed concentrations.
Protected methodAnalyzeFromPreprocessedWithoutReset Creates an analyis from preprocessed spectra and preprocessed concentrations.
Public methodStatic memberCrossValidationIteration 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.
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
Public methodStatic memberGetCrossPRESS Get the cross predicted error sum of squares for the number of factors=0...numFactors.
Public methodStatic memberGetCrossXResiduals Calculates the spectral residuals obtained from cross validation.
Public methodStatic memberGetCrossYPredicted Calculates the cross predicted y values.
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetPredictionScores Calculates the prediction scores.
Public methodGetPRESSFromPreprocessed 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.
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodGetXLeverageFromPreprocessed Calculates the spectral leverage from preprocessed spectra.
Public methodGetXLeverageFromRaw Calculates the spectral leverage from raw spectra.
Protected methodInternalGetPredictionScores Calculates the prediction scores (for use with the preprocessed spectra).
Protected methodInternalGetXLeverageFromPreprocessed Calculates the spectral leverage values from the preprocessed spectra.
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Public methodStatic memberPostprocessTargetVariablesInline(IMultivariatePreprocessingModel, IMatrixDouble) This calculates from the predicted (but still centered) y values the raw y values.
Public methodStatic memberPostprocessTargetVariablesInline(IMatrixDouble, IReadOnlyListDouble, IReadOnlyListDouble) This calculates from the predicted (but still centered) y values the raw y values.
Public methodPredictedYAndSpectralResidualsFromPreprocessed This calculates the spectral residuals.
Public methodPredictYFromPreprocessed This predicts concentrations of unknown spectra.
Public methodPredictYFromRaw Predicts y values from raw (unpreprocessed) spectra.
Public methodStatic memberPreprocessForAnalysis Preprocesses the x and y matrices before usage in multivariate calibrations.
Public methodStatic memberPreprocessSpectraForAnalysis Preprocesses the spectra. This is the common first part, without ensemble processing.
Public methodStatic memberPreprocessSpectraForPrediction(IMultivariateCalibrationModel, Double, IROMatrixDouble, Double, IMatrixDouble) This will convert the raw spectra (horizontally in matrixX) to preprocessed spectra according to the calibration model.
Public methodStatic memberPreprocessSpectraForPrediction(ISingleSpectrumPreprocessor, IEnsembleMeanScalePreprocessor, Double, IROMatrixDouble, IReadOnlyListDouble, IReadOnlyListDouble, Double, IMatrixDouble) Preprocesses the x and y matrices before usage in multivariate calibrations.
Public methodStatic memberPreprocessTargetVariablesForAnalysis Preprocesses the x and y matrices before usage in multivariate calibrations.
Public methodStatic memberPreprocessTargetVariablesForAnalysisInline Preprocess the y values for analysis (mean center, scale currently not used).
Public methodReset Resets the regression, so that it appears like newly created.
Public methodSetCalibrationModel 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.
Public methodSpectralResidualsFromPreprocessed(IROMatrixDouble, Int32) This calculates the spectral residuals.
Public methodSpectralResidualsFromPreprocessed(IROMatrixDouble, Int32, IMatrixDouble) This calculates the spectral residuals.
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Top
Remarks

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.

See Also