Classes | Typedefs | Functions
SQPrediction.h File Reference
#include "SQDef.h"
#include "SQErrorCodes.h"
#include "SQCommon.h"
#include "SQIntVector.h"
#include "SQVectorData.h"

Go to the source code of this file.

Classes

struct  tagSQ_Prediction
 

Typedefs

typedef struct tagSQ_PredictionSQ_Prediction
 

Functions

SQ_ErrorCode SQ_ClearPrediction (SQ_Prediction *pPrediction)
 
SQ_ErrorCode SQ_GetContributionsScorePSSingleWeight (SQ_Prediction pPrediction, int iObs1Ix, int iObs2Ix, SQ_WeightType eWeightType, int iComponent, int iYVar, SQ_ReconstructState bReconstruct, SQ_VectorData *pVectorData)
 
SQ_ErrorCode SQ_GetContributionsScorePSSingleWeightGroup (SQ_Prediction pPrediction, SQ_IntVector *pObs1Ix, SQ_IntVector *pObs2Ix, SQ_WeightType eWeightType, int iComponent, int iYVar, SQ_ReconstructState bReconstruct, SQ_VectorData *pVectorData)
 
SQ_ErrorCode SQ_GetContributionsScorePSMultiWeight (SQ_Prediction pPrediction, int iObs1Ix, int iObs2Ix, SQ_IntVector *pWeightType, SQ_IntVector *pComponents, SQ_ReconstructState bReconstruct, SQ_VectorData *pVectorData)
 
SQ_ErrorCode SQ_GetContributionsScorePSMultiWeightGroup (SQ_Prediction pPrediction, SQ_IntVector *pObs1Ix, SQ_IntVector *pObs2Ix, SQ_IntVector *pWeightType, SQ_IntVector *pComponents, SQ_ReconstructState bReconstruct, SQ_VectorData *pVectorData)
 
SQ_ErrorCode SQ_GetContributionsDModXPS (SQ_Prediction pPrediction, int iObsIx, SQ_WeightType eWeightType, int iComponent, int iYVar, SQ_ReconstructState bReconstruct, SQ_VectorData *pVectorData)
 
SQ_ErrorCode SQ_GetContributionsDModXPSGroup (SQ_Prediction pPrediction, SQ_IntVector *pObsIx, SQ_WeightType eWeightType, int iComponent, int iYVar, SQ_ReconstructState bReconstruct, SQ_VectorData *pVectorData)
 
SQ_ErrorCode SQ_GetContributionsDModYPS (SQ_Prediction pPrediction, int iObsIx, SQ_WeightType eWeightType, int iComponent, SQ_VectorData *pVectorData)
 
SQ_ErrorCode SQ_GetContributionsDModYPSGroup (SQ_Prediction pPrediction, SQ_IntVector *pObsIx, SQ_WeightType eWeightType, int iComponent, SQ_VectorData *pVectorData)
 
SQ_ErrorCode SQ_GetDModXPS (SQ_Prediction pPrediction, SQ_IntVector *pComponents, SQ_NormalizedState bNormalized, SQ_ModelingPowerWeightedState bModelingPowerWeighted, SQ_VectorData *pVectorData)
 
SQ_ErrorCode SQ_GetDModXPSCombined (SQ_Prediction pPrediction, SQ_IntVector *pComponents, SQ_NormalizedState bNormalized, SQ_ModelingPowerWeightedState bModelingPowerWeighted, SQ_VectorData *pVectorData)
 
SQ_ErrorCode SQ_GetDModYPS (SQ_Prediction pPrediction, SQ_IntVector *pComponents, SQ_NormalizedState bNormalized, SQ_VectorData *pVectorData)
 
SQ_ErrorCode SQ_GetPModXPS (SQ_Prediction pPrediction, SQ_IntVector *pComponents, SQ_VectorData *pVectorData)
 
SQ_ErrorCode SQ_GetPModXPSCombined (SQ_Prediction pPrediction, SQ_IntVector *pComponents, SQ_VectorData *pVectorData)
 
SQ_ErrorCode SQ_GetPModYPS (SQ_Prediction pPrediction, SQ_IntVector *pComponents, SQ_VectorData *pVectorData)
 
SQ_ErrorCode SQ_GetTPS (SQ_Prediction pPrediction, SQ_IntVector *pComponents, SQ_VectorData *pVectorData)
 
SQ_ErrorCode SQ_GetToPS (SQ_Prediction pPrediction, SQ_IntVector *pComponents, SQ_VectorData *pVectorData)
 
SQ_ErrorCode SQ_GetTPScv (SQ_Prediction pPrediction, int iComponent, SQ_VectorData *pVectorData)
 
SQ_ErrorCode SQ_GetTPScvSE (SQ_Prediction pPrediction, int iComponent, SQ_VectorData *pVectorData)
 
SQ_ErrorCode SQ_GetT2RangePS (SQ_Prediction pPrediction, int iCompFrom, int iCompTo, SQ_VectorData *pVectorData)
 
SQ_ErrorCode SQ_GetMisClassification (SQ_Prediction pPrediction, SQ_Bool bAllCombinations, SQ_VectorData *pVectorData)
 
SQ_ErrorCode SQ_GetROC (SQ_Prediction pPrediction, int iYVar, SQ_VectorData *pROCCalculations)
 
SQ_ErrorCode SQ_GetRMSEP (SQ_Prediction pPrediction, SQ_IntVector *pComponents, SQ_VectorData *pVectorData)
 
SQ_ErrorCode SQ_GetMBEP (SQ_Prediction pPrediction, SQ_IntVector *pComponents, SQ_VectorData *pVectorData)
 
SQ_ErrorCode SQ_GetSerrLPS (SQ_Prediction pPrediction, int iComponent, SQ_UnscaledState bUnscaled, SQ_BacktransformedState bBackTransformed, SQ_IntVector *pColumnYIndices, SQ_VectorData *pVectorData)
 
SQ_ErrorCode SQ_GetSerrUPS (SQ_Prediction pPrediction, int iComponent, SQ_UnscaledState bUnscaled, SQ_BacktransformedState bBackTransformed, SQ_IntVector *pColumnYIndices, SQ_VectorData *pVectorData)
 
SQ_ErrorCode SQ_GetXObsResPS (SQ_Prediction pPrediction, int iComponent, SQ_UnscaledState bUnscaled, SQ_BacktransformedState bBackTransformed, SQ_IntVector *pObservations, SQ_ReconstructState bReconstruct, SQ_VectorData *pVectorData)
 
SQ_ErrorCode SQ_GetXObsPredPS (SQ_Prediction pPrediction, int iComponent, SQ_UnscaledState bUnscaled, SQ_BacktransformedState bBackTransformed, SQ_IntVector *pObservations, SQ_ReconstructState bReconstruct, SQ_VectorData *pVectorData)
 
SQ_ErrorCode SQ_GetXVarPS (SQ_Prediction pPrediction, SQ_UnscaledState bUnscaled, SQ_BacktransformedState bBackTransformed, SQ_IntVector *pColumnXIndices, SQ_VectorData *pVectorData)
 
SQ_ErrorCode SQ_GetXVarPredPS (SQ_Prediction pPrediction, int iComponent, SQ_IntVector *pColumnXIndices, SQ_UnscaledState bUnscaled, SQ_BacktransformedState bBackTransformed, SQ_VectorData *pVectorData)
 
SQ_ErrorCode SQ_GetXVarResPS (SQ_Prediction pPrediction, int iComponent, SQ_IntVector *pColumnXIndices, SQ_UnscaledState bUnscaled, SQ_BacktransformedState bBackTransformed, SQ_StandardizedState bStandardized, SQ_VectorData *pVectorData)
 
SQ_ErrorCode SQ_GetYPredPS (SQ_Prediction pPrediction, int iComponent, SQ_UnscaledState bUnscaled, SQ_BacktransformedState bBackTransformed, SQ_IntVector *pColumnYIndices, SQ_VectorData *pVectorData)
 
SQ_ErrorCode SQ_GetYPredPSConfIntPlus (SQ_Prediction pPrediction, int iComponent, SQ_UnscaledState bUnscaled, SQ_BacktransformedState bBackTransformed, SQ_IntVector *pColumnYIndices, float fLevel, SQ_VectorData *pVectorData)
 
SQ_ErrorCode SQ_GetYPredPSConfIntMinus (SQ_Prediction pPrediction, int iComponent, SQ_UnscaledState bUnscaled, SQ_BacktransformedState bBackTransformed, SQ_IntVector *pColumnYIndices, float fLevel, SQ_VectorData *pVectorData)
 
SQ_ErrorCode SQ_GetYPredPScv (SQ_Prediction pPrediction, int iComponent, SQ_UnscaledState bUnscaled, SQ_BacktransformedState bBackTransformed, int iColumnYIndex, SQ_VectorData *pVectorData)
 
SQ_ErrorCode SQ_GetYPredPScvSE (SQ_Prediction pPrediction, int iComponent, SQ_IntVector *pColumnYIndices, SQ_VectorData *pVectorData)
 
SQ_ErrorCode SQ_GetYObsResPS (SQ_Prediction pPrediction, int iComponent, SQ_IntVector *pObservations, SQ_UnscaledState bUnscaled, SQ_BacktransformedState bBackTransformed, SQ_VectorData *pVectorData)
 
SQ_ErrorCode SQ_GetYVarPS (SQ_Prediction pPrediction, SQ_UnscaledState bUnscaled, SQ_BacktransformedState bBackTransformed, SQ_IntVector *pColumnYIndices, SQ_VectorData *pVectorData)
 
SQ_ErrorCode SQ_GetYVarResPS (SQ_Prediction pPrediction, int iComponent, SQ_UnscaledState bUnscaled, SQ_BacktransformedState bBackTransformed, SQ_StandardizedState bStandardized, SQ_IntVector *pColumnYIndices, SQ_VectorData *pVectorData)
 

Detailed Description

This file list the SQ_Prediction object used to get data from a prediction.

Typedef Documentation

◆ SQ_Prediction

typedef struct tagSQ_Prediction * SQ_Prediction

The handle used to identify a prediction object. IMPORTANT: Always initialize it to NULL!

Function Documentation

◆ SQ_ClearPrediction()

SQ_ErrorCode SQ_ClearPrediction ( SQ_Prediction pPrediction)

Removes the allocated memory for the Prediction object. This function must be called for every Prediction object that is created, if not a memory leak will occur.

Parameters
[in]pPredictionThe Prediction object to remove.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetContributionsDModXPS()

SQ_ErrorCode SQ_GetContributionsDModXPS ( SQ_Prediction  pPrediction,
int  iObsIx,
SQ_WeightType  eWeightType,
int  iComponent,
int  iYVar,
SQ_ReconstructState  bReconstruct,
SQ_VectorData pVectorData 
)

Get the DModX contributions from the predicted results. Contribution is used to understand how an observation differs from the others in an X score(t) or in DModX. See the document "SIMCA-Q Interface Description.pdf" for a more detailed description on contributions.

Parameters
[in]pPredictionThe handle to the predictions, is retrieved from GetPrediction()
[in]iObsIxIndex in the observation matrix (the predictionset).
[in]eWeightTypeThe type of weight. If the model is a PCA model this parameter must be Normalized, RX. If the model is a PLS model this parameter must be Normalized, RX, CoeffCS or VIP.
[in]iComponentThe component of the weight. For an OPLS model the component must be the last predictive.
[in]iYVarThe index of the Y variable to use if eWeightType is CoeffCS. If eWeightType is something else, this parameter is ignored.
See also
GetColumnYIndexByName
Parameters
[in]bReconstructIf the project is a wavelet spectral compressed project and this parameter is true the returned matrix will be back transformed to the original domain.
[out]pVectorDataA pointer to the DModXPS contribution results. Number of rows in matrix = 1. Number of columns in matrix = number of x-variables in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetContributionsDModXPSGroup()

SQ_ErrorCode SQ_GetContributionsDModXPSGroup ( SQ_Prediction  pPrediction,
SQ_IntVector pObsIx,
SQ_WeightType  eWeightType,
int  iComponent,
int  iYVar,
SQ_ReconstructState  bReconstruct,
SQ_VectorData pVectorData 
)

Get the DModX contributions from the predicted results. Contribution is used to understand how an observation differs from the others in an X score(t) or in DModX. See the document "SIMCA-Q Interface Description.pdf" for a more detailed description on contributions.

Parameters
[in]pPredictionThe handle to the predictions, is retrieved from GetPrediction()
[in]pObsIxA list of indices in the observation matrix (the predictionset).
[in]eWeightTypeThe type of weight. If the model is a PCA model this parameter must be Normalized, RX. If the model is a PLS model this parameter must be Normalized, RX, CoeffCS or VIP.
[in]iComponentThe component of the weight. For an OPLS model the component must be the last predictive.
[in]iYVarThe index of the Y variable to use if eWeightType is CoeffCS. If eWeightType is something else, this parameter is ignored.
See also
GetColumnYIndexByName
Parameters
[in]bReconstructIf the project is a wavelet spectral compressed project and this parameter is true the returned matrix will be back transformed to the original domain.
[out]pVectorDataA pointer to the DModXPS contribution results. Number of rows in matrix = 1. Number of columns in matrix = number of x-variables in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetContributionsDModYPS()

SQ_ErrorCode SQ_GetContributionsDModYPS ( SQ_Prediction  pPrediction,
int  iObsIx,
SQ_WeightType  eWeightType,
int  iComponent,
SQ_VectorData pVectorData 
)

Get the DModY contributions from the predicted results. Contribution is used to understand how an observation differs from the others in DModY. See the document "SIMCA-Q Interface Description.pdf" for a more detailed description on contributions. The function fails if the model doesn't have any components or if the model isn't a PLS model.

Parameters
[in]pPredictionThe handle to the predictions, is retrieved from GetPrediction()
[in]iObsIxIndex in the observation matrix (the predictionset).
[in]eWeightTypeThe type of weight. This parameter must be Normalized or RY.
[in]iComponentThe component of the weight. For an OPLS model the component must be the last predictive.
[out]pVectorDataA pointer to the DModYPS contribution results. Number of rows in matrix = 1. Number of columns in matrix = number of Y-variables in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetContributionsDModYPSGroup()

SQ_ErrorCode SQ_GetContributionsDModYPSGroup ( SQ_Prediction  pPrediction,
SQ_IntVector pObsIx,
SQ_WeightType  eWeightType,
int  iComponent,
SQ_VectorData pVectorData 
)

Get the DModY group contributions from the predicted results. Contribution is used to understand how an observation differs from the others in DModY. See the document "SIMCA-Q Interface Description.pdf" for a more detailed description on contributions. The function fails if the model doesn't have any components or if the model isn't a PLS model.

Parameters
[in]pPredictionThe handle to the predictions, is retrieved from GetPrediction()
[in]pObsIxA list of indices in the observation matrix (the predictionset).
[in]eWeightTypeThe type of weight. This parameter must be Normalized or RY.
[in]iComponentThe component of the weight. For an OPLS model the component must be the last predictive.
[out]pVectorDataA pointer to the DModYPS contribution results. Number of rows in matrix = 1. Number of columns in matrix = number of Y-variables in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetContributionsScorePSMultiWeight()

SQ_ErrorCode SQ_GetContributionsScorePSMultiWeight ( SQ_Prediction  pPrediction,
int  iObs1Ix,
int  iObs2Ix,
SQ_IntVector pWeightType,
SQ_IntVector pComponents,
SQ_ReconstructState  bReconstruct,
SQ_VectorData pVectorData 
)

Get the score multi weight contributions from the predicted results. Contribution is used to understand how an observation differs from the others in an X score(t) or in DModX. See the document "SIMCA-Q Interface Description.pdf" for a more detailed description on contributions.

Parameters
[in]pPredictionThe handle to the predictions, is retrieved from GetPrediction()
[in]iObs1IxIndex in the observation matrix (the predictionset). for the reference observation (from observation). 0 if the average is to be used.
[in]iObs2IxIndex in the observation matrix (the predictionset) of the observation for which the contributions are to be calculated (to observation).
[in]pWeightTypeAn int vector containing SQ_WeightType enums. If the model is a PCA model this parameter must be P. If the model is a PLS model this parameter must be P or WStar. If the model is a OPLS model this parameter must be P or PO.
[in]pComponentsA list of component Indices to use. 1 for component 1 in the model, 2 for component 2 and so on. NULL if all components in the model should be used. for OPLS models and PRange weight the component argument is ignored, all components are used, for weight Po the component argument is the orthogonal component number and the model must be OPLS for P_Po, supply 2 components, one predictive component and one orthogonal component.
[in]bReconstructIf the project is a wavelet spectral compressed project and this parameter is true the returned matrix will be back transformed to the original domain.
[out]pVectorDataA pointer to the Scores multi weight contribution results. Number of rows in matrix = 1. Number of columns in matrix = number of x-variables in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetContributionsScorePSMultiWeightGroup()

SQ_ErrorCode SQ_GetContributionsScorePSMultiWeightGroup ( SQ_Prediction  pPrediction,
SQ_IntVector pObs1Ix,
SQ_IntVector pObs2Ix,
SQ_IntVector pWeightType,
SQ_IntVector pComponents,
SQ_ReconstructState  bReconstruct,
SQ_VectorData pVectorData 
)

Get the score multi weight contributions from the predicted results. Contribution is used to understand how an observation differs from the others in an X score(t) or in DModX. See the document "SIMCA-Q Interface Description.pdf" for a more detailed description on contributions.

Parameters
[in]pPredictionThe handle to the predictions, is retrieved from GetPrediction()
[in]pObs1IxA list of indices in the observation matrix (the predictionset). for the reference observations (from observation). NULL if the average is to be used.
[in]pObs2IxA list of indices in the observation matrix (the predictionset) of the observations for which the contributions are to be calculated (to observation).
[in]pWeightTypeAn int vector containing SQ_WeightType enums If the model is a PCA model this parameter must be P. If the model is a PLS model this parameter must be P or WStar. If the model is a OPLS model this parameter must be P or PO.
[in]pComponentsA list of component Indices to use. 1 for component 1 in the model, 2 for component 2 and so on. NULL if all components in the model should be used. for OPLS models and PRange weight the component argument is ignored, all components are used, for weight Po the component argument is the orthogonal component number and the model must be OPLS for P_Po, supply 2 components, one predictive component and one orthogonal component.
[in]bReconstructIf the project is a wavelet spectral compressed project and this parameter is true the returned matrix will be back transformed to the original domain.
[out]pVectorDataA pointer to the Scores multi weight contribution results. Number of rows in matrix = 1. Number of columns in matrix = number of x-variables in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetContributionsScorePSSingleWeight()

SQ_ErrorCode SQ_GetContributionsScorePSSingleWeight ( SQ_Prediction  pPrediction,
int  iObs1Ix,
int  iObs2Ix,
SQ_WeightType  eWeightType,
int  iComponent,
int  iYVar,
SQ_ReconstructState  bReconstruct,
SQ_VectorData pVectorData 
)

Get the score single weight contributions from the predicted results. Contribution is used to understand how an observation differs from the others in an X score(t) or in DModX. See the document "SIMCA-Q Interface Description.pdf" for a more detailed description on contributions.

Parameters
[in]pPredictionThe handle to the predictions, is retrieved from GetPrediction()
[in]iObs1IxIndex in the observation matrix (the predictionset) for the reference observation (from observation). 0 if the average is to be used.
[in]iObs2IxIndex in the observation matrix (the predictionset) of the observation for which the contributions are to be calculated (to observation).
[in]eWeightTypeThe type of weight. If the model is a PCA model this parameter must be Normalized, Raw, RX or P. If the model is a PLS model this parameter can be any weight defined in SQ_WeightType.
[in]iComponentThe component of the weight. Ignored if eWeightType=Normalized or Raw. For an OPLS model with weight CoeffCS or VIP the component must be the last predictive.
[in]iYVarThe index of the Y variable to use if eWeightType is CoeffCS or CoeffCSRaw. If eWeightType is something else, this parameter is ignored.
See also
GetColumnYIndexByName
Parameters
[in]bReconstructIf the project is a wavelet spectral compressed project and this parameter is true the returned matrix will be back transformed to the original domain.
[out]pVectorDataA pointer to the Scores single weight contribution results. Number of rows in matrix = 1. Number of columns in matrix = number of x-variables in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetContributionsScorePSSingleWeightGroup()

SQ_ErrorCode SQ_GetContributionsScorePSSingleWeightGroup ( SQ_Prediction  pPrediction,
SQ_IntVector pObs1Ix,
SQ_IntVector pObs2Ix,
SQ_WeightType  eWeightType,
int  iComponent,
int  iYVar,
SQ_ReconstructState  bReconstruct,
SQ_VectorData pVectorData 
)

Get the score single weight group contributions from the predicted results. Contribution is used to understand how an observation differs from the others in an X score(t) or in DModX. See the document "SIMCA-Q Interface Description.pdf" for a more detailed description on contributions.

Parameters
[in]pPredictionThe handle to the predictions, is retrieved from GetPrediction()
[in]pObs1IxA list of indices in the observation matrix (the predictionset) for the reference observations (from observation). NULL if the average is to be used.
[in]pObs2IxA list of indices in the observation matrix (the predictionset) of the observations for which the contributions are to be calculated (to observation).
[in]eWeightTypeThe type of weight. If the model is a PCA model this parameter must be Normalized, Raw, RX or P. If the model is a PLS model this parameter can be any weight defined in SQ_WeightType.
[in]iComponentThe component of the weight. Ignored if eWeightType=Normalized or Raw. For an OPLS model with weight CoeffCS or VIP the component must be the last predictive.
[in]iYVarThe index of the Y variable to use if eWeightType is CoeffCS or CoeffCSRaw. If eWeightType is something else, this parameter is ignored.
See also
GetColumnYIndexByName
Parameters
[in]bReconstructIf the project is a wavelet spectral compressed project and this parameter is true the returned matrix will be back transformed to the original domain.
[out]pVectorDataA pointer to the Scores single weight contribution results. Number of rows in matrix = 1. Number of columns in matrix = number of x-variables in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetDModXPS()

SQ_ErrorCode SQ_GetDModXPS ( SQ_Prediction  pPrediction,
SQ_IntVector pComponents,
SQ_NormalizedState  bNormalized,
SQ_ModelingPowerWeightedState  bModelingPowerWeighted,
SQ_VectorData pVectorData 
)

Retrieves the DModXPS from the predicted data. Distance to the model in the X space (row residual SD), after xx components (the selected dimension), for new observations in the predictionset. If you select component 0, it is the Stdev of the observations as scaled in the workset.

Parameters
[in]pPredictionThe handle to the predictions, is retrieved from GetPrediction()
[in]pComponentsA list of component indices to use. 1 for component 1 in the model, 2 for component 2 and so on. NULL if all components in the model should be used. If NULL is used, the returned matrix will contain the number of components + 1 rows, i.e. the first row will contain the data after 0 components. For an OPLS model, the last predictive component and zero are the only valid ones.
[in]bNormalizedIf true, the results will be in units of standard deviation of the pooled RSD of the model If false, they will be in absolute values.
[in]bModelingPowerWeightedIf true, the function will weight the residuals by the modeling power of the variables.
[out]pVectorDataA pointer to the DModXPS results. Number of rows in matrix = number of components chosen (length of pComponents). Number of columns in matrix = number of observations in the prediction.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetDModXPSCombined()

SQ_ErrorCode SQ_GetDModXPSCombined ( SQ_Prediction  pPrediction,
SQ_IntVector pComponents,
SQ_NormalizedState  bNormalized,
SQ_ModelingPowerWeightedState  bModelingPowerWeighted,
SQ_VectorData pVectorData 
)

Retrieves the DModXPS+ matrix from the predicted data. Combination of DModXPS plus Hotelling T2 when the latter is outside the critical limit. For observations in the predictionset. If you select component 0, it is the Stdev of the observations as scaled in the workset.

Parameters
[in]pPredictionThe handle to the predictions, is retrieved from GetPrediction()
[in]pComponentsA list of component Indices to use. 1 for component 1 in the model, 2 for component 2 and so on. NULL if all components in the model should be used. If NULL is used, the returned matrix will contain the number of components + 1 rows, i.e. the first row will contain the data after 0 components. For an OPLS model, the last predictive component and zero are the only valid ones.
[in]bModelingPowerWeightedIf true, the function will weight the residuals by the modeling power of the variables.
[in]bNormalizedIf True, the results will be in units of standard deviation of the pooled RSD of the model If False, they will be in absolute values.
[out]pVectorDataA pointer to the DModXPS+ results. Number of rows in matrix = number of components chosen (length of pnComponentList). Number of columns in matrix = number of observations that was sent to Predict()/BatchPredict().
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetDModYPS()

SQ_ErrorCode SQ_GetDModYPS ( SQ_Prediction  pPrediction,
SQ_IntVector pComponents,
SQ_NormalizedState  bNormalized,
SQ_VectorData pVectorData 
)

Retrieves the DModYPS from the predicted data. Distance to the model in the Y space (row residual SD), after xx components (the selected dimension), for new observations in the predictionset. If you select component 0, it is the Stdev of the observations as scaled in the workset.

Parameters
[in]pPredictionThe handle to the predictions, is retrieved from GetPrediction()
[in]pComponentsA list of component Indices to use. 1 for component 1 in the model, 2 for component 2 and so on. NULL if all components in the model should be used. If NULL is used, the returned matrix will contain the number of components + 1 rows, i.e. the first row will contain the data after 0 components. For an OPLS model, the last predictive component and zero are the only valid ones.
[in]bNormalizedIf True, the results will be in units of standard deviation of the pooled RSD of the model If False, they will be in absolute values.
[out]pVectorDataA pointer to the DModYPS results. Number of rows in matrix = number of components chosen (length of pComponents). Number of columns in matrix = number of observations in the prediction.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetMBEP()

SQ_ErrorCode SQ_GetMBEP ( SQ_Prediction  pPrediction,
SQ_IntVector pComponents,
SQ_VectorData pVectorData 
)

Retrieves the MBEP matrix. Root mean square error of the fit for observations in the predictionset. The function fails if the model is not a PLS model or if the model doesn't have any components.

Parameters
[in]pPredictionThe handle to the predictions, is retrieved from GetPrediction()
[in]pComponentsA list of component Indices to use. For an OPLS model, the last predictive component is the only valid one.
[out]pVectorDataA pointer to the MBEP results. Number of rows in matrix = number of components chosen (length of pComponents). Number of columns in matrix = number of y-variables in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetMisClassification()

SQ_ErrorCode SQ_GetMisClassification ( SQ_Prediction  pPrediction,
SQ_Bool  bAllCombinations,
SQ_VectorData pVectorData 
)

Retrieves the misclassification table.

Parameters
[in]pPredictionThe handle to the predictions, is retrieved from GetPrediction()
[in]bAllCombinationsA boolean to retrieve all different combinations between classes
[out]pVectorDataA pointer to the misclassification results.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetPModXPS()

SQ_ErrorCode SQ_GetPModXPS ( SQ_Prediction  pPrediction,
SQ_IntVector pComponents,
SQ_VectorData pVectorData 
)

Retrieves the PModXPS from the predicted data. Probability of belonging to the model in the X space for observations in the prediction set. Component 0 corresponds to a point model (center of coordinate system). Observations with PModX less than 5% are considered non members.

Parameters
[in]pPredictionThe handle to the predictions, is retrieved from GetPrediction()
[in]pComponentsA list of component Indices to use. 1 for component 1 in the model, 2 for component 2 and so on. NULL if all components in the model should be used. If NULL is used, the returned matrix will contain the number of components + 1 rows, i.e. the first row will contain the data after 0 components. For an OPLS model, the last predictive component is the only valid one.
[out]pVectorDataA pointer to the PModXPS results. Number of rows in matrix = number of components chosen (length of pComponents). Number of columns in matrix = number of observations in the prediction.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetPModXPSCombined()

SQ_ErrorCode SQ_GetPModXPSCombined ( SQ_Prediction  pPrediction,
SQ_IntVector pComponents,
SQ_VectorData pVectorData 
)

Retrieves the PModXPS+ from the predicted data. Combination of PModXPS plus Hotelling T2 when the latter is outside the critical limit. Component 0 corresponds to a point model (center of coordinate system).

Parameters
[in]pPredictionThe handle to the predictions, is retrieved from GetPrediction()
[in]pComponentsA list of component Indices to use. 1 for component 1 in the model, 2 for component 2 and so on. NULL if all components in the model should be used. If NULL is used, the returned matrix will contain the number of components + 1 rows, i.e. the first row will contain the data after 0 components. For an OPLS model, the last predictive component is the only valid one.
[out]pVectorDataA pointer to the PModXPS+ results. Number of rows in matrix = number of components chosen (length of pComponents). Number of columns in matrix = number of observations in the prediction.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetPModYPS()

SQ_ErrorCode SQ_GetPModYPS ( SQ_Prediction  pPrediction,
SQ_IntVector pComponents,
SQ_VectorData pVectorData 
)

Retrieves the PModYPS from the predicted data. Probability of belonging to the model in the Y space for observations in the prediction set. Component 0 corresponds to a point model (center of coordinate system). Observations with PModY less than 5% are considered non members.

Parameters
[in]pPredictionThe handle to the predictions, is retrieved from GetPrediction()
[in]pComponentsA list of component indices to use. 1 for component 1 in the model, 2 for component 2 and so on. NULL if all components in the model should be used. If NULL is used, the returned matrix will contain the number of components + 1 rows, i.e. the first row will contain the data after 0 components. For an OPLS model, the last predictive component is the only valid one.
[out]pVectorDataA pointer to the PModYPS results. Number of rows in matrix = number of components chosen (length of pComponents). Number of columns in matrix = number of observations that was in the prediction set.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetRMSEP()

SQ_ErrorCode SQ_GetRMSEP ( SQ_Prediction  pPrediction,
SQ_IntVector pComponents,
SQ_VectorData pVectorData 
)

Retrieves the RMSEP matrix. Root mean square error of the fit for observations in the predictionset. The function fails if the model is not a PLS model or if the model doesn't have any components.

Parameters
[in]pPredictionThe handle to the predictions, is retrieved from GetPrediction()
[in]pComponentsA list of component Indices to use. For an OPLS model, the last predictive component is the only valid one.
[out]pVectorDataA pointer to the RMSEP results. Number of rows in matrix = number of components chosen (length of pComponents). Number of columns in matrix = number of y-variables in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetROC()

SQ_ErrorCode SQ_GetROC ( SQ_Prediction  pPrediction,
int  iYVar,
SQ_VectorData pROCCalculations 
)

Returns the receiver operating characteristic for the current prediction set (see wikipedia).

Parameters
[in]pPredictionThe handle to the predictions, is retrieved from GetPrediction() The model must be a PLS-DA model with two classes or a class model.
[in]iYVarIf the model is a PLS-DA model this is the index of the Y-variable (class) that the ROC is to be calculated for. This argument is ignored for class models.
[out]pROCCalculationsA vector data with three rows, the first contains the true positive rate, the second the false positive rate and the third, the threshold for the points.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetSerrLPS()

SQ_ErrorCode SQ_GetSerrLPS ( SQ_Prediction  pPrediction,
int  iComponent,
SQ_UnscaledState  bUnscaled,
SQ_BacktransformedState  bBackTransformed,
SQ_IntVector pColumnYIndices,
SQ_VectorData pVectorData 
)

Retrieves SerrLPS. Lower limit of the standard error of the predicted response Y (As selected) for a new observation in the prediction set. The function fails if the model is not a PLS model or if the model doesn't have any components.

Parameters
[in]pPredictionThe handle to the predictions, is retrieved from GetPrediction()
[in]iComponentThe number of the component in the model we want the results from For an OPLS model, the last predictive component is the only valid one.
[in]bUnscaledIf True, the function will return the x-values in the (unscaled) metric of the dataset. If False, the returned x-values will be in the scaled and centerd metric of the workset. Note that if bBackTransformed is false, the x-values will still be transformed. Note also that if bBackTransformed is true, this parameter is ignored. In this case x-values will always be unscaled.
[in]bBackTransformedIf True, the function will return the x-values in the unscaled untransformed metric of the workset. If False the returned x-values will be transformed in the same way as the workset. Note that if this variable is true, the returned x-values will always be unscaled irrespective of the value of bUnscaled.
[in]pColumnYIndicesA list of Y column Indices to use. NULL if all y columns in the model should be used
See also
GetColumnYIndexByName
Parameters
[out]pVectorDataA pointer to the SerrLPS results. Number of rows in matrix = number of y-variables chosen. Number of columns in matrix = number of observations in the prediction.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetSerrUPS()

SQ_ErrorCode SQ_GetSerrUPS ( SQ_Prediction  pPrediction,
int  iComponent,
SQ_UnscaledState  bUnscaled,
SQ_BacktransformedState  bBackTransformed,
SQ_IntVector pColumnYIndices,
SQ_VectorData pVectorData 
)

Retrieves SerrUPS. Upper limit of the standard error of the predicted response Y (as selected) for a new observation in the prediction set. SerrUPS is always in original units, i.e., back transformed when the response Y was transformed. The function fails if the model is not a PLS model or if the model doesn't have any components.

Parameters
[in]pPredictionThe handle to the predictions, is retrieved from GetPrediction()
[in]iComponentThe number of the component in the model we want the results from For an OPLS model, the last predictive component is the only valid one.
[in]bUnscaledIf True, the function will return the x-values in the (unscaled) metric of the dataset. If False, the returned x-values will be in the scaled and centered metric of the workset. Note that if bBackTransformed is false, the x-values will still be transformed. Note also that if bBackTransformed is true, this parameter is ignored. In this case x-values will always be unscaled.
[in]bBackTransformedIf True, the function will return the x-values in the unscaled untransformed metric of the workset. If False the returned x-values will be transformed in the same way as the workset. Note that if this variable is true, the returned x-values will always be unscaled irrespective of the value of bUnscaled.
[in]pColumnYIndicesA list of Y column Indices to use. NULL if all y columns in the model should be used
See also
GetColumnYIndexByName
Parameters
[out]pVectorDataA pointer to the SerrUPS results. Number of rows in matrix = number of y-variables chosen. Number of columns in matrix = number of observations in the prediction.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetT2RangePS()

SQ_ErrorCode SQ_GetT2RangePS ( SQ_Prediction  pPrediction,
int  iCompFrom,
int  iCompTo,
SQ_VectorData pVectorData 
)

Retrieves the T2RangePS matrix from the predicted data. Hotelling T2RangePS is a combination of all the scores (tPS) in the selected range of components. It is a measure of how far away an observation is from the center of a PC or PLS model hyperplane in the selected range of components. If the prediction handle comes from the observation level of a batch project, the results will be T2RangeBCCPS. T2RangeBCCPS is a combination of all the scores in the selected range computed at every time point. It is a measure of how far a batch time point is from the average trajectory at the same time point. The function fails if the model doesn't have any components. T2RangePS for an OPLS model is only valid for component 1 to last (Predictive + X Side orthogonal).

Parameters
[in]pPredictionThe handle to the predictions, is retrieved from GetPrediction()
[in]iCompFromThe first component in the requested range.
[in]iCompToThe last component in the requested range. Use -1 if you want it to be the last component in model. This is the preferred way for OPLS which always requires the last component.
[out]pVectorDataA pointer to the T2RangePS results. Number of rows in matrix = 1. Number of columns in matrix = number of observations that was sent to Predict()/BatchPredict().
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetToPS()

SQ_ErrorCode SQ_GetToPS ( SQ_Prediction  pPrediction,
SQ_IntVector pComponents,
SQ_VectorData pVectorData 
)

Retrieves the ToPS from a prediction. Scores that summarizes the X variation orthogonal to Y for the prediction set. The function fails if the model is not an O2PLS or OPLS model.

Parameters
[in]pPredictionThe handle to the predictions, is retrieved from GetPrediction()
[in]pComponentsA list of component indices to use. 1 for component 1 in the model, 2 for component 2 and so on. NULL if all components should be used.
[out]pVectorDataA pointer to the ToPS results. Number of rows in matrix = number of components chosen (length of pComponents). Number of columns in matrix = number of observations in the prediction.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetTPS()

SQ_ErrorCode SQ_GetTPS ( SQ_Prediction  pPrediction,
SQ_IntVector pComponents,
SQ_VectorData pVectorData 
)

Retrieves the TPS from the predicted data. The predicted scores, (for new observations), one vector for each model dimension. They are new variables, computed from the model. They summarize X, to best approximate X (PC model), and both approximate X and predict Y (PLS model). The function fails if the model doesn't have any components.

Parameters
[in]pPredictionThe handle to the predictions, is retrieved from GetPrediction()
[in]pComponentsA list of component Indices to use. 1 for component 1 in the model, 2 for component 2 and so on. NULL if all components in the model should be used.
[out]pVectorDataA pointer to the TPS results. Number of rows in matrix = number of components chosen (length of pComponents). Number of columns in matrix = number of observations in the prediction.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetTPScv()

SQ_ErrorCode SQ_GetTPScv ( SQ_Prediction  pPrediction,
int  iComponent,
SQ_VectorData pVectorData 
)

Retrieves the TPScv from the predicted data. The predicted scores tPS computed from all the Cross Validation rounds. The function fails if the model doesn't have any components.

Parameters
[in]pPredictionThe handle to the predictions, is retrieved from GetPrediction()
[in]iComponentThe number of the component in the model we want the results from
[out]pVectorDataA pointer to the TPScv results. Number of rows in matrix = number of cross-validation rounds. Number of columns in matrix = number of observations in the prediction.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetTPScvSE()

SQ_ErrorCode SQ_GetTPScvSE ( SQ_Prediction  pPrediction,
int  iComponent,
SQ_VectorData pVectorData 
)

Retrieves the TPScvSE from the predicted data. Jack knife standard error of the predicted scores tPS computed from the cross validations. The function fails if the model doesn't have any components.

Parameters
[in]pPredictionThe handle to the predictions, is retrieved from GetPrediction()
[in]iComponentThe number of the component in the model we want the results from
[out]pVectorDataA pointer to the TPScvSE results. Number of rows in matrix = 1 Number of columns in matrix = number of observations in the prediction.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetXObsPredPS()

SQ_ErrorCode SQ_GetXObsPredPS ( SQ_Prediction  pPrediction,
int  iComponent,
SQ_UnscaledState  bUnscaled,
SQ_BacktransformedState  bBackTransformed,
SQ_IntVector pObservations,
SQ_ReconstructState  bReconstruct,
SQ_VectorData pVectorData 
)

Retrieves the XObsPredPS from the predicted data. A reconstructed observation as X=TP from the predictions set. The function fails if the model doesn't have any components.

Parameters
[in]pPredictionThe handle to the predictions, is retrieved from GetPrediction()
[in]iComponentThe number of the component in the model we want the results from For an OPLS model, the last predictive component is the only valid one.
[in]bUnscaledIf true, the function will return the residuals in the (unscaled) metric of the dataset. If false, the returned residuals will be in the scaled and centered metric of the workset. Note that if bBackTransformed is false, the residuals will still be transformed. Note also that if bBackTransformed is true, this parameter is ignored. In this case residuals will always be unscaled.
[in]bBackTransformedIf true, the function will return the residuals in the unscaled untransformed metric of the workset. If false the returned residuals will be transformed in the same way as the workset. Note that if this variable is true, the returned residuals will always be unscaled irrespective of the value of bUnscaled.
[in]pObservationsA list of observation Indices in the prediction, NULL if all observations in the prediction should be used.
[in]bReconstructIf the project is a wavelet spectral compressed project and this parameter is true the returned matrix will be back transformed to the original domain.
[out]pVectorDataA pointer to the XObsPredPS results. Number of rows in matrix = Number of observations chosen. Number of columns in matrix = number of x-variables in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetXObsResPS()

SQ_ErrorCode SQ_GetXObsResPS ( SQ_Prediction  pPrediction,
int  iComponent,
SQ_UnscaledState  bUnscaled,
SQ_BacktransformedState  bBackTransformed,
SQ_IntVector pObservations,
SQ_ReconstructState  bReconstruct,
SQ_VectorData pVectorData 
)

Retrieves the XObsResPS matrix from the predicted data. The residuals of an X observation in the predictionset, in original units. The function fails if the model doesn't have any components.

Parameters
[in]pPredictionThe handle to the predictions, is retrieved from GetPrediction()
[in]iComponentThe number of the component in the model we want the results from For an OPLS model, the last predictive component is the only valid one.
[in]bUnscaledIf true, the function will return the residuals in the (unscaled) metric of the dataset. If false, the returned residuals will be in the scaled and centered metric of the workset. Note that if bBackTransformed is false, the residuals will still be transformed. Note also that if bBackTransformed is true, this parameter is ignored. In this case residuals will always be unscaled.
[in]bBackTransformedIf true, the function will return the residuals in the unscaled untransformed metric of the workset. If false the returned residuals will be transformed in the same way as the workset. Note that if this variable is true, the returned residuals will always be unscaled irrespective of the value of bUnscaled.
[in]pObservationsA list of observation Indices in the prediction, NULL if all observations in the prediction should be used.
[in]bReconstructIf the project is a wavelet spectral compressed project and this parameter is true the returned matrix will be back transformed to the original domain.
[out]pVectorDataA pointer to the XObsResPS results. Number of rows in matrix = Number of observations chosen. Number of columns in matrix = number of x-variables in the model.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetXVarPredPS()

SQ_ErrorCode SQ_GetXVarPredPS ( SQ_Prediction  pPrediction,
int  iComponent,
SQ_IntVector pColumnXIndices,
SQ_UnscaledState  bUnscaled,
SQ_BacktransformedState  bBackTransformed,
SQ_VectorData pVectorData 
)

Retrieves the XVarPredPS matrix from a prediction. For PLS and PCA models, X variables, from the prediction set, reconstructed as X=Tps*P'. For OPLS/O2PLS models it is the X-values predicted from from the given Y-values. The function fails if the model doesn't have any components

Parameters
[in]pPredictionThe handle to the predictions, is retrieved from GetPrediction()
[in]iComponentThe component to use For an OPLS model, the last predictive component is the only valid one.
[in]pColumnXIndicesA list of X column indices to use. NULL if all x columns in the model should be used
[in]bUnscaledIf True, the function will return the residuals in the (unscaled) metric of the dataset. If False, the returned residuals will be in the scaled and centered metric of the workset. Note that if bBackTransformed is False, the residuals will still be transformed. Note also that if bBackTransformed is True, this parameter is ignored. In this case residuals will always be unscaled.
[in]bBackTransformedIf True, the function will return the residuals in the unscaled untransformed metric of the workset. If False the returned residuals will be transformed in the same way as the workset. Note that if this variable is True, the returned residuals will always be unscaled irrespective of the value of bUnscaled.
[out]pVectorDataA pointer to the XVarPredPS results. Number of rows in matrix = number of x-variables chosen (length of pColumnXIndices). Number of columns in matrix = number of observations in the prediction.
Returns
Returns SQ_E_OK if success or an error code
See also
SQX_GetColumnXIndexByName

◆ SQ_GetXVarPS()

SQ_ErrorCode SQ_GetXVarPS ( SQ_Prediction  pPrediction,
SQ_UnscaledState  bUnscaled,
SQ_BacktransformedState  bBackTransformed,
SQ_IntVector pColumnXIndices,
SQ_VectorData pVectorData 
)

Retrieves XVarPS. X variable from the predictionset, in original units.

Parameters
[in]pPredictionThe handle to the predictions, is retrieved from GetPrediction()
[in]bUnscaledIf True, the function will return the x-values in the (unscaled) metric of the dataset. If False, the returned x-values will be in the scaled and centerd metric of the workset. Note that if bBackTransformed is false, the x-values will still be transformed. Note also that if bBackTransformed is true, this parameter is ignored. In this case x-values will always be unscaled.
[in]bBackTransformedIf True, the function will return the x-values in the unscaled untransformed metric of the workset. If False the returned x-values will be transformed in the same way as the workset. Note that if this variable is true, the returned x-values will always be unscaled irrespective of the value of bUnscaled.
[in]pColumnXIndicesA list of X column Indices to use. NULL if all x columns in the model should be used
See also
GetColumnXIndexByName
Parameters
[out]pVectorDataA pointer to the XVarPS results. Number of rows in matrix = number of x-variables chosen. Number of columns in matrix = number of observations in the prediction.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetXVarResPS()

SQ_ErrorCode SQ_GetXVarResPS ( SQ_Prediction  pPrediction,
int  iComponent,
SQ_IntVector pColumnXIndices,
SQ_UnscaledState  bUnscaled,
SQ_BacktransformedState  bBackTransformed,
SQ_StandardizedState  bStandardized,
SQ_VectorData pVectorData 
)

Retrieves the XVarResPS from the predictionset. X Variable residuals in original units, for observations in the Predictionset.

Parameters
[in]pPredictionThe handle to the predictions, is retrieved from GetPrediction()
[in]iComponentThe number of the component in the model we want the results from For an OPLS model, the last predictive component is the only valid one.
[in]pColumnXIndicesA list of X column Indices to use. NULL if all x columns in the model should be used
See also
GetColumnXIndexByName
Parameters
[in]bUnscaledIf true, the function will return the residuals in the (unscaled) metric of the dataset. If false, the returned residuals will be in the scaled and centered metric of the workset. Note that if bBackTransformed is false, the residuals will still be transformed. Note also that if bBackTransformed is true, this parameter is ignored. In this case residuals will always be unscaled.
[in]bBackTransformedIf true, the function will return the residuals in the unscaled untransformed metric of the workset. If false the returned residuals will be transformed in the same way as the workset. Note that if this variable is true, the returned residuals will always be unscaled irrespective of the value of bUnscaled.
[in]bStandardizedIf true, the function will use the standardized residuals (the unscaled residuals divided by their standard deviation).
[out]pVectorDataA pointer to the XVarResPS results. Number of rows in matrix = number of x-variables chosen. Number of columns in matrix = number of observations in the prediction.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetYObsResPS()

SQ_ErrorCode SQ_GetYObsResPS ( SQ_Prediction  pPrediction,
int  iComponent,
SQ_IntVector pObservations,
SQ_UnscaledState  bUnscaled,
SQ_BacktransformedState  bBackTransformed,
SQ_VectorData pVectorData 
)

Retrieves the predicted YObsResPS The residuals of an observation (Y space) in the prediction set. Since no predictions are performed on Y, this function will only return missing values, except for the observation level of a batch project were we have Maturity or Time as Y. The function fails if the model is not a PLS model.

Parameters
[in]pPredictionThe handle to the predictions, is retrieved from GetPrediction()
[in]iComponentThe number of the component in the model we want the results from
[in]pObservationsA list of observation Indices in the prediction, NULL if all observations in the prediction should be used.
[in]bUnscaledIf true, the function will return the residuals in the (unscaled) metric of the dataset. If false, the returned residuals will be in the scaled and centered metric of the workset. Note that if bBackTransformed is false, the residuals will still be transformed. Note also that if bBackTransformed is true, this parameter is ignored. In this case residuals will always be unscaled.
[in]bBackTransformedIf true, the function will return the residuals in the unscaled untransformed metric of the workset. If false the returned residuals will be transformed in the same way as the workset. Note that if this variable is true, the returned residuals will always be unscaled irrespective of the value of bUnscaled.
[out]pVectorDataA pointer to the YObsResPS results. Number of rows in matrix = number of y-variables in the model. Number of columns in matrix = number of observations chosen.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetYPredPS()

SQ_ErrorCode SQ_GetYPredPS ( SQ_Prediction  pPrediction,
int  iComponent,
SQ_UnscaledState  bUnscaled,
SQ_BacktransformedState  bBackTransformed,
SQ_IntVector pColumnYIndices,
SQ_VectorData pVectorData 
)

Retrieves the YPredPS. Predicted values of Y variables, in original units for observations in the predictionset. The function fails if the model is not a PLS model or if the model doesn't have any components.

Parameters
[in]pPredictionThe handle to the predictions, is retrieved from GetPrediction()
[in]iComponentThe number of the component in the model we want the results from For an OPLS model, the last predictive component is the only valid one.
[in]bUnscaledIf true, the function will return the y-values in the (unscaled) metric of the dataset. If false, the returned y-values will be in the scaled and centered metric of the workset. Note that if bBackTransformed is false, the y-values will still be transformed. Note also that if bBackTransformed is true, this parameter is ignored. In this case y-values will always be unscaled.
[in]bBackTransformedIf true, the function will return the y-values in the unscaled untransformed metric of the workset. If false the returned y-values will be transformed in the same way as the workset. Note that if this variable is true, the returned y-values will always be unscaled irrespective of the value of bUnscaled.
[in]pColumnYIndicesA list of Y column Indices to use. NULL if all y columns in the model should be used
See also
GetColumnYIndexByName
Parameters
[out]pVectorDataA pointer to the YPredPS results. Number of rows in matrix = number of y-variables chosen. Number of columns in matrix = number of observations in the prediction.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetYPredPSConfIntMinus()

SQ_ErrorCode SQ_GetYPredPSConfIntMinus ( SQ_Prediction  pPrediction,
int  iComponent,
SQ_UnscaledState  bUnscaled,
SQ_BacktransformedState  bBackTransformed,
SQ_IntVector pColumnYIndices,
float  fLevel,
SQ_VectorData pVectorData 
)

Retrieves the predicted YPredPSConfInt-. The confidence intervals for predictions (basically GetYPredPScvSE * -t). The function fails if the model is not a PLS model or if the model doesn't have any components.

Parameters
[in]pPredictionThe handle to the predictions, is retrieved from GetPrediction()
[in]iComponentThe number of the component in the model we want the results from For an OPLS model, the last predictive component is the only valid one.
[in]bUnscaledIf true, the function will return the y-values in the (unscaled) metric of the dataset. If false, the returned y-values will be in the scaled and centered metric of the workset. Note that if bBackTransformed is false, the y-values will still be transformed. Note also that if bBackTransformed is true, this parameter is ignored. In this case y-values will always be unscaled.
[in]bBackTransformedIf true, the function will return the y-values in the unscaled untransformed metric of the workset. If false the returned y-values will be transformed in the same way as the workset. Note that if this variable is true, the returned y-values will always be unscaled irrespective of the value of bUnscaled.
[in]pColumnYIndicesA list of Y column Indices to use. NULL if all y columns in the model should be used
See also
GetColumnYIndexByName
Parameters
[in]fLevelThe probability level, .95 means 95% probability. If -1, the default level from the model is used.
[out]pVectorDataA pointer to the YPredPSConfInt- results. Number of rows in matrix = number of y-variables chosen. Number of columns in matrix = number of observations in the prediction.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetYPredPSConfIntPlus()

SQ_ErrorCode SQ_GetYPredPSConfIntPlus ( SQ_Prediction  pPrediction,
int  iComponent,
SQ_UnscaledState  bUnscaled,
SQ_BacktransformedState  bBackTransformed,
SQ_IntVector pColumnYIndices,
float  fLevel,
SQ_VectorData pVectorData 
)

Retrieves the predicted YPredPSConfInt+. The confidence intervals for predictions (basically GetYPredPScvSE * +t). The function fails if the model is not a PLS model or if the model doesn't have any components.

Parameters
[in]pPredictionThe handle to the predictions, is retrieved from GetPrediction()
[in]iComponentThe number of the component in the model we want the results from For an OPLS model, the last predictive component is the only valid one.
[in]bUnscaledIf true, the function will return the y-values in the (unscaled) metric of the dataset. If false, the returned y-values will be in the scaled and centered metric of the workset. Note that if bBackTransformed is false, the y-values will still be transformed. Note also that if bBackTransformed is true, this parameter is ignored. In this case y-values will always be unscaled.
[in]bBackTransformedIf true, the function will return the y-values in the unscaled untransformed metric of the workset. If false the returned y-values will be transformed in the same way as the workset. Note that if this variable is true, the returned y-values will always be unscaled irrespective of the value of bUnscaled.
[in]pColumnYIndicesA list of Y column Indices to use. NULL if all y columns in the model should be used
See also
GetColumnYIndexByName
Parameters
[in]fLevelThe probability level, .95 means 95% probability. If -1, the default level from the model is used.
[out]pVectorDataA pointer to the YPredPSConfInt+ results. Number of rows in matrix = number of y-variables chosen. Number of columns in matrix = number of observations in the prediction.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetYPredPScv()

SQ_ErrorCode SQ_GetYPredPScv ( SQ_Prediction  pPrediction,
int  iComponent,
SQ_UnscaledState  bUnscaled,
SQ_BacktransformedState  bBackTransformed,
int  iColumnYIndex,
SQ_VectorData pVectorData 
)

Retrieves the predicted YPredPScv xx cross-validated predictions for observations that were not in the training set. These predictions are computed using the xx submodels of the training set generated from the xx rounds of cross validation. The function fails if the model is not a PLS model or if the model doesn't have any components.

Parameters
[in]pPredictionThe handle to the predictions, is retrieved from GetPrediction()
[in]iComponentThe number of the component in the model we want the results from For an OPLS model, the last predictive component is the only valid one.
[in]bUnscaledIf true, the function will return the y-values in the (unscaled) metric of the dataset. If false, the returned y-values will be in the scaled and centered metric of the workset. Note that if bBackTransformed is false, the y-values will still be transformed. Note also that if bBackTransformed is true, this parameter is ignored. In this case y-values will always be unscaled.
[in]bBackTransformedIf true, the function will return the y-values in the unscaled untransformed metric of the workset. If false the returned y-values will be transformed in the same way as the workset. Note that if this variable is true, the returned y-values will always be unscaled irrespective of the value of bUnscaled.
[in]iColumnYIndexIndex of the Y column to use.
See also
GetColumnYIndexByName
Parameters
[out]pVectorDataA pointer to the YPredPScv results. Number of rows in matrix = number of y-variables chosen. Number of columns in matrix = number of observations in the prediction.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetYPredPScvSE()

SQ_ErrorCode SQ_GetYPredPScvSE ( SQ_Prediction  pPrediction,
int  iComponent,
SQ_IntVector pColumnYIndices,
SQ_VectorData pVectorData 
)

Retrieves the predicted YPredPScvSE. Jack-knife standard error of predictions for observations not in the training set computed from the cross validations. The function fails if the model is not a PLS model or if the model doesn't have any components.

Parameters
[in]pPredictionThe handle to the predictions, is retrieved from GetPrediction()
[in]iComponentThe number of the component in the model we want the results from For an OPLS model, the last predictive component is the only valid one.
[in]pColumnYIndicesA list of Y column Indices to use. NULL if all y columns in the model should be used
See also
GetColumnYIndexByName
Parameters
[out]pVectorDataA pointer to the YPredPScvSE results. Number of rows in matrix = number of y-variables chosen. Number of columns in matrix = number of observations in the prediction.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetYVarPS()

SQ_ErrorCode SQ_GetYVarPS ( SQ_Prediction  pPrediction,
SQ_UnscaledState  bUnscaled,
SQ_BacktransformedState  bBackTransformed,
SQ_IntVector pColumnYIndices,
SQ_VectorData pVectorData 
)

Retrieves the predicted YVarPS. Since no predictions are performed on Y, this function will only return missing values, except for the observation level of a batch project were we have Maturity or Time as Y. The function fails if the model is not a PLS model

Parameters
[in]pPredictionThe handle to the predictions, is retrieved from GetPrediction()
[in]bUnscaledIf true, the function will return the y-values in the (unscaled) metric of the dataset. If false, the returned y-values will be in the scaled and centered metric of the workset. Note that if bBackTransformed is false, the y-values will still be transformed. Note also that if bBackTransformed is true, this parameter is ignored. In this case y-values will always be unscaled.
[in]bBackTransformedIf true, the function will return the y-values in the unscaled untransformed metric of the workset. If false the returned y-values will be transformed in the same way as the workset. Note that if this variable is true, the returned y-values will always be unscaled irrespective of the value of bUnscaled.
[in]pColumnYIndicesA list of Y column Indices to use. NULL if all y columns in the model should be used
See also
GetColumnYIndexByName
Parameters
[out]pVectorDataA pointer to the YVarPS results. Number of rows in matrix = number of y-variables in chosen. Number of columns in matrix = number of observations in the prediction.
Returns
Returns SQ_E_OK if success or an error code

◆ SQ_GetYVarResPS()

SQ_ErrorCode SQ_GetYVarResPS ( SQ_Prediction  pPrediction,
int  iComponent,
SQ_UnscaledState  bUnscaled,
SQ_BacktransformedState  bBackTransformed,
SQ_StandardizedState  bStandardized,
SQ_IntVector pColumnYIndices,
SQ_VectorData pVectorData 
)

Retrieves the predicted YVarResPS. Y Variable residuals for observations in the prediction set. Since no predictions are performed on Y, this function will only return missing values, except for the observation level of a batch project were we have Maturity or Time as Y. The function fails if the model is not a PLS model.

Parameters
[in]pPredictionThe handle to the predictions, is retrieved from GetPrediction()
[in]iComponentThe number of the component in the model we want the results from For an OPLS model, the last predictive component is the only valid one.
[in]bUnscaledIf true, the function will return the y-values in the (unscaled) metric of the dataset. If false, the returned y-values will be in the scaled and centered metric of the workset. Note that if bBackTransformed is false, the y-values will still be transformed. Note also that if bBackTransformed is true, this parameter is ignored. In this case y-values will always be unscaled.
[in]bBackTransformedIf true, the function will return the y-values in the unscaled untransformed metric of the workset. If false the returned y-values will be transformed in the same way as the workset. Note that if this variable is true, the returned y-values will always be unscaled irrespective of the value of bUnscaled.
[in]bStandardizedIf true, the function will use the standardized residuals (the unscaled residuals divided by their standard deviation).
[in]pColumnYIndicesA list of Y column Indices to use. NULL if all y columns in the model should be used
See also
GetColumnYIndexByName
Parameters
[out]pVectorDataA pointer to the YVarResPS results. Number of rows in matrix = number of y-variables in chosen. Number of columns in matrix = number of observations in the prediction.
Returns
Returns SQ_E_OK if success or an error code

Copyright (C) Sartorius Stedim Data Analytics AB - Generated by Doxygen