#include "SQDef.h"
#include "SQErrorCodes.h"
#include "SQVariable.h"
#include "SQBatchPrediction.h"
#include "SQStringMatrix.h"
Go to the source code of this file.
Classes | |
struct | tagSQ_PrepareBatchPrediction |
Typedefs | |
typedef struct tagSQ_PrepareBatchPrediction * | SQ_PrepareBatchPrediction |
This file list the SQ_PrepareBatchPrediction object used to set data for a prediction.
typedef struct tagSQ_PrepareBatchPrediction * SQ_PrepareBatchPrediction |
The handle used to identify the object that sets data for a batch prediction. IMPORTANT: Always initialize it to NULL!
SQ_ErrorCode SQ_ClearPrepareBatchPrediction | ( | SQ_PrepareBatchPrediction * | pPreparePrediction | ) |
Removes the allocated memory for the PrepareBatchPrediction object. This function must be called for every PrepareBatchPrediction object that is created, if not a memory leak will occur.
[in] | pPreparePrediction | The PrepareBatchPrediction object to remove. |
SQ_ErrorCode SQ_GetBatchConditionVariablesForBatchPrediction | ( | SQ_PrepareBatchPrediction | pPreparePrediction, |
SQ_VariableVector * | pBCVariables | ||
) |
Retrieves the batch and phase condition variables that are included in the BLM. If data is missing for any of the variables, set them to "missing value". Both quantitative and qualitative variables and X and Y will be returned.
[in] | pPreparePrediction | The PreparePrediction object to use for the prediction. |
[out] | pBCVariables | The Batch condition variables needed as input to GetBatchPrediction. |
SQ_ErrorCode SQ_GetBatchPrediction | ( | SQ_PrepareBatchPrediction | pPreparePrediction, |
SQ_BatchPrediction * | pPrediction | ||
) |
Performs a batch prediction on the data that have been set with SQ_SetQualitativeBatchData and SQ_SetQuantitativeBatchData. The returned object must be released by SQ_ClearBatchPrediction.
[in] | pPreparePrediction | The data to use for the prediction. |
[out] | pPrediction | The prediction object that should be used to retrieve the prediction results. Must be released by SQ_ClearBatchPrediction. |
SQ_ErrorCode SQ_GetLocalCenteringInfo | ( | SQ_PrepareBatchPrediction | pPreparePrediction, |
int | iPhase, | ||
SQ_VariableVector * | pVariables, | ||
SQ_FloatVector * | pDefaultValues | ||
) |
A request for the local centering connected with the given model number. If the model is a batch model and local centering was not specified for a variable in this phase, but has been specified for the variable in another phase, the average of all phases will be returned for this phase.
[in] | pPreparePrediction | The PreparePrediction object to use for the prediction. |
[in] | iPhase | The phase to get the Local Centering information for. |
[out] | pVariables | The variables that local centering data was found for. |
[out] | pDefaultValues | The default values. |
SQ_ErrorCode SQ_GetPhaseIterationConditionVariablesForBatchPrediction | ( | SQ_PrepareBatchPrediction | pPreparePrediction, |
SQ_VariableVector * | pBCVariables | ||
) |
Retrieves the phase iteration condition variables that are included in the BLM. If data is missing for any of the variables, set them to "missing value". Both quantitative and qualitative variables and X and Y will be returned.
[in] | pPreparePrediction | The PreparePrediction object to use for the prediction. |
[out] | pBCVariables | The phase iteration condition variables needed as input to GetBatchPrediction. |
SQ_ErrorCode SQ_GetVariablesForBatchPrediction | ( | SQ_PrepareBatchPrediction | pPreparePrediction, |
int | iPhase, | ||
SQ_VariableVector * | pVariables | ||
) |
Retrieves the variables that the current model are based on. These are the variables that are needed to perform a prediction. If data is missing for any of the variables, set them to "missing value". Both quantitative and qualitative variables and X and Y will be returned.
[in] | pPreparePrediction | The PreparePrediction object to use for the prediction. |
[in] | iPhase | The index of the phase to set the data for. |
[out] | pVariables | The variables needed as input to GetBatchPrediction. |
SQ_ErrorCode SQ_SetPhaseIterations | ( | SQ_PrepareBatchPrediction | pPreparePrediction, |
int | iPhase, | ||
SQ_IntVector | pPhaseIterations | ||
) |
Sets the phase iteration for each observation, the vectur muste bee sorted ascending.
[in] | pPreparePrediction | The data to use for the prediction. |
[in] | iPhase | The index of the phase to set the data for. |
[in] | pPhaseIterations | The phase iteration indexes for each observation in the phase, the vector must be sorted ascending. |
SQ_ErrorCode SQ_SetQualitativeBatchConditionData | ( | SQ_PrepareBatchPrediction | pPreparePrediction, |
int | iBCIndex, | ||
const char * | szData | ||
) |
Sets qualitative Batch/Phase Condition data for the prediction. This function can be used even for quantitative data, the string will then be converted to a float.
[in] | pPreparePrediction | The data to use for the prediction. |
[in] | iBCIndex | The index of the Batch/Phase Condition variable to set the data for. |
[in] | szData | The string data to predict, UTF-8 encoded. |
SQ_ErrorCode SQ_SetQualitativeBatchConditionDataVector | ( | SQ_PrepareBatchPrediction | pPreparePrediction, |
SQ_StringVector | pData | ||
) |
Sets qualitative Batch/Phase Condition data for the prediction. This function can be used even for quantitative data, the string will then be converted to a float.
[in] | pPreparePrediction | The data to use for the prediction. |
[in] | pData | The string data for batch predictions. Must be the number of columns as batch and phase condition variables. |
SQ_ErrorCode SQ_SetQualitativeBatchData | ( | SQ_PrepareBatchPrediction | pPreparePrediction, |
int | iPhase, | ||
int | iRow, | ||
int | iColumn, | ||
const char * | szData | ||
) |
Sets qualitative data for the prediction. This function can be used even for quantitative data, the string will then be converted to a float.
[in] | pPreparePrediction | The data to use for the prediction. |
[in] | iPhase | The index of the phase to set the data for. |
[in] | iRow | The row/observation to set the data for. The matrix will automatically be increased to the correct size. |
[in] | iColumn | The column/variable to set the data for. |
[in] | szData | The string data to predict, UTF-8 encoded. |
SQ_ErrorCode SQ_SetQualitativeBatchDataMatrix | ( | SQ_PrepareBatchPrediction | pPreparePrediction, |
int | iPhase, | ||
SQ_StringMatrix | pMatrix | ||
) |
Sets qualitative data for the prediction. This function can be used even for quantitative data, the string will then be converted to a float.
[in] | pPreparePrediction | The data to use for the prediction. |
[in] | iPhase | The phase to set the data for. |
[in] | pMatrix | A matrix with the same number of columns as the phase it should set prediction data for. |
SQ_ErrorCode SQ_SetQualitativePhaseIterationConditionData | ( | SQ_PrepareBatchPrediction | pPreparePrediction, |
int | iPCVarIndex, | ||
const char * | szPhase, | ||
int | iPItCIndex, | ||
const char * | szData | ||
) |
Sets qualitative Phase Iteration Condition data for the prediction. This function can be used even for quantitative data, the string will then be converted to a float.
[in] | pPreparePrediction | The data to use for the prediction. |
[in] | iPCVarIndex | The index of the Phase Iteration Condition variable to set the data for. |
[in] | iPItCIndex | The index of the Phase Iteration Condition to set the data for. |
[in] | szPhase | The name of the Phase. |
[in] | szData | The string data to predict, UTF-8 encoded. |
SQ_ErrorCode SQ_SetQualitativePhaseIterationConditionDataMatrix | ( | SQ_PrepareBatchPrediction | pPreparePrediction, |
const char * | szPhase, | ||
SQ_StringMatrix | pData | ||
) |
Sets qualitative Phase Iteration Condition data for the prediction. This function can be used even for quantitative data, the string will then be converted to a float.
[in] | pPreparePrediction | The data to use for the prediction. |
[in] | szPhase | The name of the Phase. |
[in] | pData | The string data for batch predictions. Must be one row per phase iteration and one column per phase iteration condition variable. |
SQ_ErrorCode SQ_SetQuantitativeBatchConditionData | ( | SQ_PrepareBatchPrediction | pPreparePrediction, |
int | iBCIndex, | ||
const float | fVal | ||
) |
Sets quantitative Batch/Phase Condition data for the prediction. This function can be used even for qualitative data, the index of the settings should then be used.
[in] | pPreparePrediction | The data to use for the prediction. |
[in] | iBCIndex | The index of the Batch/Phase Condition variable to set the data for. |
[in] | fVal | The float data to predict. |
SQ_ErrorCode SQ_SetQuantitativeBatchConditionDataVector | ( | SQ_PrepareBatchPrediction | pPreparePrediction, |
SQ_FloatVector | pData | ||
) |
Sets quantitative Batch/Phase Condition data for the prediction. This function can be used even for qualitative data, the index of the settings should then be used.
[in] | pPreparePrediction | The data to use for the prediction. |
[in] | pData | The string data for batch predictions. Must be the number of columns as batch and phase condition variables. |
SQ_ErrorCode SQ_SetQuantitativeBatchData | ( | SQ_PrepareBatchPrediction | pPreparePrediction, |
int | iPhase, | ||
int | iRow, | ||
int | iColumn, | ||
const float | fVal | ||
) |
Sets quantitative data for the prediction. This function can be used even for qualitative data, the index of the settings should then be used.
[in] | pPreparePrediction | The data to use for the prediction. |
[in] | iPhase | The phase to set the data for. |
[in] | iRow | The row/observation to set the data for. The matrix will automatically be increased to the correct size. |
[in] | iColumn | The column/variable to set the data for. |
[in] | fVal | The float data to predict. |
SQ_ErrorCode SQ_SetQuantitativeBatchDataMatrix | ( | SQ_PrepareBatchPrediction | pPreparePrediction, |
int | iPhase, | ||
SQ_FloatMatrix | pMatrix | ||
) |
Sets quantitative data for the prediction. This function can be used even for qualitative data, the index of the settings should then be used.
[in] | pPreparePrediction | The data to use for the prediction. |
[in] | iPhase | The phase to set the data for. |
[in] | pMatrix | A matrix with the same number of columns as the phase it should set prediction data for. |
SQ_ErrorCode SQ_SetQuantitativeBatchDataRaw | ( | SQ_PrepareBatchPrediction | pPreparePrediction, |
int | iPhase, | ||
int | iNumberOfRows, | ||
const float * | pValues | ||
) |
Sets quantitative data for the prediction. This function can be used even for qualitative data, the index of the settings should then be used.
[in] | pPreparePrediction | The data to use for the prediction. |
[in] | iPhase | The phase to set the data for. |
[in] | iNumberOfRows | The number of rows included in the prediction data The matrix will automatically be increased to the correct size. |
[in] | pValues | A pointer to a matrix of float values with the same number of columns as the phase it should set prediction data for. |
SQ_ErrorCode SQ_SetQuantitativePhaseIterationConditionData | ( | SQ_PrepareBatchPrediction | pPreparePrediction, |
int | iPCVarIndex, | ||
const char * | szPhase, | ||
int | iPItCIndex, | ||
const float | fVal | ||
) |
Sets quantitative Phase Iteration Condition data for the prediction. This function can be used even for qualitative data, the index of the settings should then be used.
[in] | pPreparePrediction | The data to use for the prediction. |
[in] | iPCVarIndex | The index of the Phase Iteration Condition variable to set the data for. |
[in] | szPhase | The name of the Phase. |
[in] | iPItCIndex | The index of the Phase Iteration Condition in that pahse to set the data for. |
[in] | fVal | The float data to predict. |
SQ_ErrorCode SQ_SetQuantitativePhaseIterationConditionDataMatrix | ( | SQ_PrepareBatchPrediction | pPreparePrediction, |
const char * | szPhase, | ||
SQ_FloatMatrix | pData | ||
) |
Sets quantitative Phase Iteration Condition data for the prediction. This function can be used even for qualitative data, the index of the settings should then be used.
[in] | pPreparePrediction | The data to use for the prediction. |
[in] | szPhase | The name of the Phase. |
[in] | pData | The string data for batch predictions. Must be one row per phase iteration and one column per phase iteration condition variable. |
SQ_ErrorCode SQ_SpecifyLocalCentering | ( | SQ_PrepareBatchPrediction | pPreparePrediction, |
int | iPhase, | ||
SQ_VariableVector | pVariables, | ||
SQ_FloatVector | pLocalCenteringValue | ||
) |
Will specify new local centering values that will be used when performing predictions.
[in] | pPreparePrediction | The PreparePrediction object to use for the prediction. |
[in] | iPhase | The phase to specify the Local Centering information for. |
[in] | pVariables | The variables that local centering data was found for. |
[in] | pLocalCenteringValue | The new center values to use. |
Copyright (C) Sartorius Stedim Data Analytics AB - Generated by Doxygen