#include "SQDef.h"
#include "SQErrorCodes.h"
#include "SQModel.h"
#include "SQComponentVector.h"
#include "SQMWorkset.h"
Go to the source code of this file.
|
SQ_ErrorCode | SQ_GetWorksetCopy (SQ_Model pModel, SQ_Workset *pWorksetHandle) |
|
SQ_ErrorCode | SQ_AutofitModel (SQ_Model pModel) |
|
SQ_ErrorCode | SQ_AutofitClassModels (SQ_Model pModel, SQ_IntVector hClasses, SQ_ComponentVector hComponents) |
|
SQ_ErrorCode | SQ_SetCenterOfScores (SQ_Model pModel, float fCenterOfScores) |
|
SQ_ErrorCode | SQ_GetCenterOfScores (SQ_Model pModel, float *pfCenterOfScores) |
|
SQ_ErrorCode | SQ_SetModelTitle (SQ_Model pModel, const char *szModelTitle) |
|
SQ_ErrorCode | SQ_SetModelConfidenceLevel (SQ_Model pModel, float fLevel) |
|
SQ_ErrorCode | SQ_SetModelSignificanceLevel (SQ_Model pModel, float fLevel) |
|
SQ_ErrorCode | SQ_DeleteModel (SQ_Model pModel) |
|
SQ_ErrorCode | SQ_CalculateNextComponent (SQ_Model pModel) |
|
SQ_ErrorCode | SQ_CalculateOPLSComponents (SQ_Model pModel, SQ_ComponentVector oComponents) |
|
SQ_ErrorCode | SQ_RemoveComponent (SQ_Model pModel) |
|
SQ_ErrorCode | SQ_SetCVGroupAsEveryNthObservation (SQ_Model pModel, int iCVGroupsNumber) |
|
SQ_ErrorCode | SQ_SetCVGroupObservationBasedOnScores (SQ_Model pModel, int iCVGroupsNumber, int iScoresFromModel, SQ_CVGroupBy eCVGroupBy) |
|
SQ_ErrorCode | SQ_SetCVGroupObservationBasedOnVariable (SQ_Model pModel, int iCVGroupsNumber, int iDSIndex, int iVarIndex, SQ_CVGroupBy eCVGroupBy) |
|
SQ_ErrorCode | SQ_SetCVGroupObservationBasedOnObservationID (SQ_Model pModel, int iCVGroupsNumber, int iVarID, SQ_CVGroupBy eCVGroupBy) |
|
SQ_ErrorCode | SQ_SetHierarchicalBaseModel (SQ_Model pModel, SQ_Hierarchical eIncludeVar) |
|
SQ_ErrorCode | SQ_SetNonHierarchicalBaseModel (SQ_Model pModel) |
|
SQ_ErrorCode | SQ_ChangeModelType (SQ_Model pModel, SQ_ModelType eType, int iClassNo) |
|
◆ SQ_AutofitClassModels()
Autofit class models.
- Parameters
-
[in] | pModel | The model handle to use |
[in] | hClasses | Array of classes to use |
[in] | hComponents | Array of number of components for each class. If number of components for a class is set to -1 autofit will be made. |
- Returns
- Returns SQ_E_OK if success or an error code
◆ SQ_AutofitModel()
Autofit model.
- Parameters
-
[in] | pModel | The model handle to use |
- Returns
- Returns SQ_E_OK if success or an error code
◆ SQ_CalculateNextComponent()
Calculate the next component. This can not be called for OPLS/O2PLS models.
- Parameters
-
[in] | pModel | The model handle to use |
- Returns
- Returns SQ_E_OK if success or an error code
◆ SQ_CalculateOPLSComponents()
Calculate component. This should be used for OPLS/O2PLS models.
- Parameters
-
[in] | pModel | The model handle to use |
[in] | oComponents | A component vector of at least size 1 with the number of components for each type oComponents[]={ Predictive components, X-Side orthogonal components, Y-Side orthogonal components, X-Side PCA components, for extended O2PLS models Y-Side PCA components}, for extended O2PLS models |
- Returns
- Returns SQ_E_OK if success or an error code
◆ SQ_ChangeModelType()
Change model type. The function fails if the model is fitted.
- Parameters
-
[in] | pModel | The model handle to use |
[in] | eType | The new model type. |
[in] | iClassNo | The class number to set, for PCA_Class and PLS_Class. |
- Returns
- Returns SQ_E_OK if success or an error code
◆ SQ_DeleteModel()
Delete a model.
- Parameters
-
[in] | pModel | The model handle to use |
- Returns
- Returns SQ_E_OK if success or an error code
◆ SQ_GetCenterOfScores()
Gets the center value of T used when calculating T2Range.
- Parameters
-
[in] | pModel | The model handle to use |
[out] | pfCenterOfScores | The currently used center value. |
- Returns
- Returns SQ_E_OK if success or an error code
◆ SQ_GetWorksetCopy()
Create a new workset as a copy of the workset used in an existing model. The workset can be manipulated with the functions in SQMWorkset.h Note that no new model is created in the project until SQ_CreateModel or SQ_UpdateModel is called. The returned workset handle must be released with SQ_ReleaseWorkset
- See also
- SQMWorksetCInterface.h
- Parameters
-
[in] | pModel | The model handle to use |
[out] | pWorksetHandle | The handle to the new workset. |
- Returns
- Returns SQ_E_OK if success or an error code
◆ SQ_RemoveComponent()
Remove a component. This can not be called for OPLS/O2PLS models.
- Parameters
-
[in] | pModel | The model handle to use |
- Returns
- Returns SQ_E_OK if success or an error code
◆ SQ_SetCenterOfScores()
Sets the center value of T used when calculating T2Range. Set it to -99 to use the arithmetic mean.
- Parameters
-
[in] | pModel | The model handle to use |
[in] | fCenterOfScores | The center value to use. |
- Returns
- Returns SQ_E_OK if success or an error code
◆ SQ_SetCVGroupAsEveryNthObservation()
Change the cross validation groups. Select every Nth observation where N is the number of cross validation groups. The function fails if the model is fitted.
- Parameters
-
[in] | pModel | The model handle to use |
[in] | iCVGroupsNumber | The number of cross validation groups. |
- Returns
- Returns SQ_E_OK if success or an error code
◆ SQ_SetCVGroupObservationBasedOnObservationID()
Change the cross validation groups by selecting a secondary variable ID. The function fails if the model is fitted.
- Parameters
-
[in] | pModel | The model handle to use |
[in] | iCVGroupsNumber | The number of cross validation groups. |
[in] | iVarID | The index of the Variable ID that will be used to identify the variables in the project. The variable names in the selected variable ID must be unique or the initialization will fail. |
[in] | eCVGroupBy | The strategy for dividing the observations into groups. |
- See also
- SQ_CVGroupBy
- Returns
- Returns SQ_E_OK if success or an error code
◆ SQ_SetCVGroupObservationBasedOnScores()
Change the cross validation groups. Assign observation based on the scores from an existing model. The function fails if the model is fitted.
- Parameters
-
[in] | pModel | The model handle to use |
[in] | iCVGroupsNumber | The number of cross validation groups. |
[in] | iScoresFromModel | The model to use the scores from. This model must be fitted. |
[in] | eCVGroupBy | The strategy for dividing the observations into groups. |
- See also
- SQ_CVGroupBy
- Returns
- Returns SQ_E_OK if success or an error code
◆ SQ_SetCVGroupObservationBasedOnVariable()
Change the cross validation groups by selecting a variable from a dataset. The function fails if the model is fitted.
- Parameters
-
[in] | pModel | The model handle to use |
[in] | iCVGroupsNumber | The number of cross validation groups. |
[in] | iDSIndex | The index of the dataset. |
[in] | iVarIndex | The index of the variable in the dataset. |
[in] | eCVGroupBy | The strategy for dividing the observations into groups. |
- See also
- SQ_CVGroupBy
- Returns
- Returns SQ_E_OK if success or an error code
◆ SQ_SetHierarchicalBaseModel()
Sets a fitted model as a hierarchical base model.
- Parameters
-
[in] | pModel | The model handle to use |
[in] | eIncludeVar | Defines what variables should be added to the new worksets. |
- Returns
- Returns SQ_E_OK if success or an error code
◆ SQ_SetModelConfidenceLevel()
Set the default model confidence level.
- Parameters
-
[in] | pModel | The model handle to use |
[in] | fLevel | The confidence level. 0.95 means 95% confidence level. |
- Returns
- Returns SQ_E_OK if success or an error code
◆ SQ_SetModelSignificanceLevel()
Set the default model significance level for DModX and Hotelling's T2.
- Parameters
-
[in] | pModel | The model handle to use |
[in] | fLevel | The significance level. 0.05 means 95% probability level. |
- Returns
- Returns SQ_E_OK if success or an error code
◆ SQ_SetModelTitle()
Set the model title.
- Parameters
-
[in] | pModel | The model handle to use |
[in] | szModelTitle | The new model title, UTF-8 encoded. |
- Returns
- Returns SQ_E_OK if success or an error code
◆ SQ_SetNonHierarchicalBaseModel()
Remove the hierarchical base model flag on an hierarchical base model. Note: If there exists top level models with variables from the given model, these models will be deleted.
- Parameters
-
[in] | pModel | The model handle to use |
- Returns
- Returns SQ_E_OK if success or an error code