Functions | |
cvbbool_t | PMGetTestResultClassLabel (TTESTRESULT testResult, cvbval_t classIndex, char *szClassLabel) |
Get the class label corresponding to a given index and test result. More... | |
cvbbool_t | PMGetTestResultClassLabelW (TTESTRESULT testResult, cvbval_t classIndex, wchar_t *szClassLabel) |
Get the class label corresponding to a given index and test result. More... | |
double | PMGetTestResultConfidence (TTESTRESULT testResult, cvbval_t exampleIndex) |
Returns the confidence associated with the classification of a specified example. More... | |
double | PMGetTestResultConfidenceDistribution (TTESTRESULT testResult, cvbval_t exampleIndex, cvbval_t classIndex) |
Returns the confidence asserted by the classifier for a classification of a specified example to a specified class. More... | |
double | PMGetTestResultErrorRate (TTESTRESULT testResult) |
Returns the error rate (total number of errors divided by total number of examples) made during classification testing. More... | |
double | PMGetTestResultExampleMeanSquareError (TTESTRESULT testResult, cvbval_t ExampleIndex) |
Returns the mean square error on a test example over all output coordinates. More... | |
cvbval_t | PMGetTestResultNumClasses (TTESTRESULT testResult) |
Returns the number of classes for a classifier used in the test. More... | |
double | PMGetTestResultNumericalPrediction (TTESTRESULT testResult, cvbval_t exampleIndex, cvbval_t coordinateIndex) |
Returns the actual value predicted for a specified example and a specified output coordinate. More... | |
cvbval_t | PMGetTestResultNumErrors (TTESTRESULT testResult) |
Returns the total number of errors made during classification testing. More... | |
cvbval_t | PMGetTestResultNumExamples (TTESTRESULT testResult) |
Retrieves the number of examples that were tested. More... | |
cvbval_t | PMGetTestResultOutputDimension (TTESTRESULT testResult) |
Get the number of numerical values estimated for a given test result. More... | |
cvbval_t | PMGetTestResultPredictedClass (TTESTRESULT testResult, cvbval_t exampleIndex) |
Returns the class index which was predicted for a specific example. More... | |
double | PMGetTestResultTargetValue (TTESTRESULT testResult, cvbval_t exampleIndex, cvbval_t coordinateIndex) |
Returns the target value to be predicted for a specified example and a specified output coordinate. More... | |
double | PMGetTestResultTotalMeanSquareError (TTESTRESULT testResult) |
Returns the mean square error of the predictor over all examples and all coordinates. More... | |
void | PMGetTestResultTrainParams (TTESTRESULT testResult, TTrainParams ¶ms) |
Retrieves the training parameters that were used for generating a test result. More... | |
cvbval_t | PMGetTestResultTrueClassIndex (TTESTRESULT testResult, cvbval_t exampleIndex) |
Returns the index of the true class to which an example belongs. More... | |
TPolimagoTrainingError | PMLeaveOutTestGeneric (TLEARNINGDATAACCESS db, TProgress *Progress, cvbval_t HoldOutSize, TClassifierUsage usage, const char *szPreproCode, cvbval_t featureResolution, double lambda, cvbbool_t interpolate, TTESTRESULT &TestResult) |
Performs a leave-out-crossvalidation on the specified training data set. More... | |
TPolimagoTrainingError | PMLeaveOutTestOnMts (MTS mts, TProgress *Progress, cvbval_t HoldOutSize, TClassifierUsage usage, const char *szPreproCode, cvbval_t featureResolution, double lambda, cvbbool_t interpolate, TTESTRESULT &TestResult) |
Performs a leave-out-crossvalidation on the specified training data set. More... | |
TPolimagoTrainingError | PMLeaveOutTestOnSil (TSIL sil, TProgress *Progress, cvbval_t HoldOutSize, TClassifierUsage usage, const char *szPreproCode, cvbval_t featureResolution, double lambda, cvbbool_t interpolate, TTESTRESULT &TestResult) |
Performs a leave-out-crossvalidation on the specified training data set. More... | |
cvbbool_t | PMOpenTestResult (const char *szFileName, TTESTRESULT &testResult) |
Loads the result of a sample test or a leave out test from a file. More... | |
cvbbool_t | PMOpenTestResultW (const wchar_t *szFileName, TTESTRESULT &testResult) |
Loads the result of a sample test or a leave out test from a file. More... | |
TPolimagoTrainingError | PMSampleTestGeneric (TLEARNINGDATAACCESS db, TProgress *Progress, TCLF Clf, TTESTRESULT &TestResult) |
Test a given classifier on test data available as generic data access. More... | |
TPolimagoTrainingError | PMSampleTestOnMts (MTS mts, TProgress *Progress, TCLF Clf, TTESTRESULT &TestResult) |
Test a given classifier on test data available as a MTS (Minos Training Set). More... | |
TPolimagoTrainingError | PMSampleTestOnSil (TSIL sil, TProgress *Progress, TCLF Clf, TTESTRESULT &TestResult) |
Test a given classifier on test data available as a SIL (Sample Image List). More... | |
cvbbool_t | PMSaveTestResult (const char *szFileName, TTESTRESULT testResult) |
Save the result of a sample test or a leave out test to a file. More... | |
cvbbool_t | PMSaveTestResultW (const wchar_t *szFileName, TTESTRESULT testResult) |
Save the result of a sample test or a leave out test to a file. More... | |
cvbbool_t PMGetTestResultClassLabel | ( | TTESTRESULT | testResult, |
cvbval_t | classIndex, | ||
char * | szClassLabel | ||
) |
Get the class label corresponding to a given index and test result.
szClassLabel
must be big enough to hold the entire class label, otherwise a write access violation may occur. To be on the safe side, alway allocate at least 256 bytes.[in] | testResult | Handle of the test result container. |
[in] | classIndex | Index of the class in question. Must be nonnegative and smaller than the return value of PMGetTestResultNumClasses. |
[in] | szClassLabel | Pointer to a buffer that will receive the class label string (zero-terminated!. |
TRUE
if the call was successful (i.e. all parameters are valid) FALSE
otherwise. cvbbool_t PMGetTestResultClassLabelW | ( | TTESTRESULT | testResult, |
cvbval_t | classIndex, | ||
wchar_t * | szClassLabel | ||
) |
Get the class label corresponding to a given index and test result.
szClassLabel
must be big enough to hold the entire class label, otherwise a write access violation may occur. To be on the safe side, alway allocate at least 256 bytes.[in] | testResult | Handle of the test result container. |
[in] | classIndex | Index of the class in question. Must be nonnegative and smaller than the return value of PMGetTestResultNumClasses. |
[in] | szClassLabel | Pointer to a buffer that will receive the class label string (zero-terminated!. |
TRUE
if the call was successful (i.e. all parameters are valid) FALSE
otherwise. double PMGetTestResultConfidence | ( | TTESTRESULT | testResult, |
cvbval_t | exampleIndex | ||
) |
Returns the confidence associated with the classification of a specified example.
[in] | testResult | Handle of the test result container. |
[in] | exampleIndex | Index of example. |
double PMGetTestResultConfidenceDistribution | ( | TTESTRESULT | testResult, |
cvbval_t | exampleIndex, | ||
cvbval_t | classIndex | ||
) |
Returns the confidence asserted by the classifier for a classification of a specified example to a specified class.
[in] | testResult | Handle of the test result container. |
[in] | exampleIndex | Index of example. |
[in] | classIndex | Index of class. |
double PMGetTestResultErrorRate | ( | TTESTRESULT | testResult | ) |
Returns the error rate (total number of errors divided by total number of examples) made during classification testing.
[in] | testResult | Handle of the test result container. |
double PMGetTestResultExampleMeanSquareError | ( | TTESTRESULT | testResult, |
cvbval_t | ExampleIndex | ||
) |
Returns the mean square error on a test example over all output coordinates.
[in] | testResult | Handle of the test result container. |
[in] | ExampleIndex | Index of an example in the test result. |
cvbval_t PMGetTestResultNumClasses | ( | TTESTRESULT | testResult | ) |
Returns the number of classes for a classifier used in the test.
For tests calculated with usage = CU_Regression the return value will be zero.
[in] | testResult | Handle of the test result container. |
double PMGetTestResultNumericalPrediction | ( | TTESTRESULT | testResult, |
cvbval_t | exampleIndex, | ||
cvbval_t | coordinateIndex | ||
) |
Returns the actual value predicted for a specified example and a specified output coordinate.
[in] | testResult | Handle of the test result container. |
[in] | exampleIndex | Index of test example. |
[in] | coordinateIndex | Coordinate index of predictor output. Must be larger or equal to zero and less than the result of PMGetTestResultOutputDimension. |
cvbval_t PMGetTestResultNumErrors | ( | TTESTRESULT | testResult | ) |
Returns the total number of errors made during classification testing.
[in] | testResult | Handle of the test result container. |
cvbval_t PMGetTestResultNumExamples | ( | TTESTRESULT | testResult | ) |
Retrieves the number of examples that were tested.
[in] | testResult | Handle of the test result container. |
cvbval_t PMGetTestResultOutputDimension | ( | TTESTRESULT | testResult | ) |
Get the number of numerical values estimated for a given test result.
For tests based on numerical regression (usage = CU_Regression) the result will match the label dimension used in the training database. For tests with usage = CU_ClassifyOneVersusAll the output dimension will equal the number of classes in the training database. For usage = CU_ClassifyOneVersusOne the output dimension is
.
[in] | testResult | Handle of the test result container. |
cvbval_t PMGetTestResultPredictedClass | ( | TTESTRESULT | testResult, |
cvbval_t | exampleIndex | ||
) |
Returns the class index which was predicted for a specific example.
[in] | testResult | Handle of the test result container. |
[in] | exampleIndex | Index of example. |
double PMGetTestResultTargetValue | ( | TTESTRESULT | testResult, |
cvbval_t | exampleIndex, | ||
cvbval_t | coordinateIndex | ||
) |
Returns the target value to be predicted for a specified example and a specified output coordinate.
[in] | testResult | Handle of the test result container. |
[in] | exampleIndex | Index of test example. |
[in] | coordinateIndex | Coordinate index of predictor output. Must be larger or equal to zero and less than the result of PMGetTestResultOutputDimension. |
double PMGetTestResultTotalMeanSquareError | ( | TTESTRESULT | testResult | ) |
Returns the mean square error of the predictor over all examples and all coordinates.
[in] | testResult | Handle of the test result container. |
void PMGetTestResultTrainParams | ( | TTESTRESULT | testResult, |
TTrainParams & | params | ||
) |
Retrieves the training parameters that were used for generating a test result.
[in] | testResult | Handle of the test result container. |
[out] | params | The training parameters used during generation of the test result. |
cvbval_t PMGetTestResultTrueClassIndex | ( | TTESTRESULT | testResult, |
cvbval_t | exampleIndex | ||
) |
Returns the index of the true class to which an example belongs.
[in] | testResult | Handle of the test result container. |
[in] | exampleIndex | Index of example. |
TPolimagoTrainingError PMLeaveOutTestGeneric | ( | TLEARNINGDATAACCESS | db, |
TProgress * | Progress, | ||
cvbval_t | HoldOutSize, | ||
TClassifierUsage | usage, | ||
const char * | szPreproCode, | ||
cvbval_t | featureResolution, | ||
double | lambda, | ||
cvbbool_t | interpolate, | ||
TTESTRESULT & | TestResult | ||
) |
Performs a leave-out-crossvalidation on the specified training data set.
In a leave-out-crossvalidation a number of training examples (holdout set) is removed from the data training set each on each step and is used for testing with a classifier that is generated from the rest of the training samples. The process is repeated until every example in the whole data set has been tested once.
[in] | db | Handle of the training data set as returned by PMCreateLearningDataAccess. Note that the set of callbacks specified in the call to PMCreateLearningDataAccess must match the value of the usage mode parameter! |
[in] | Progress | Callback structure for progress report. May be used to show testing progress on the user interface (see description of TProgress). |
[in] | HoldOutSize | Number of examples to leave out on each pass. |
[in] | usage | Classifier usage (see description of TClassifierUsage). |
[in] | szPreproCode | Preprocessing code to be used for the training steps of the test. |
[in] | featureResolution | Determines the dimensions of the classifier's retina (see feature-map lesson in the tutorial on search functions) |
[in] | lambda | Ridge regression regularization constant. The default value 0.01 works well in most cases. May be slightly increased for very small numbers of training examples and slightly decreased for very large numbers of training examples. |
[in] | interpolate | Image interpolation mode for feature extraction. implies simple truncation of fractional coordinates, TRUE (recommended) implies bilinear interpolation. |
[out] | TestResult | Receives the handle to the test result container (see description of TTESTRESULT). |
TPolimagoTrainingError PMLeaveOutTestOnMts | ( | MTS | mts, |
TProgress * | Progress, | ||
cvbval_t | HoldOutSize, | ||
TClassifierUsage | usage, | ||
const char * | szPreproCode, | ||
cvbval_t | featureResolution, | ||
double | lambda, | ||
cvbbool_t | interpolate, | ||
TTESTRESULT & | TestResult | ||
) |
Performs a leave-out-crossvalidation on the specified training data set.
In a leave-out-crossvalidation a number of training examples (holdout set) is removed from the data training set each on each step and is used for testing with a classifier that is generated from the rest of the training samples. The process is repeated until every example in the whole data set has been tested once.
[in] | mts | Specifies the training data set. |
[in] | Progress | Callback structure for progress report. May be used to show testing progress on the user interface (see description of TProgress). |
[in] | HoldOutSize | Number of examples to leave out on each pass. |
[in] | usage | Classifier usage (see description of TClassifierUsage). |
[in] | szPreproCode | Preprocessing code to be used for the training steps of the test. |
[in] | featureResolution | Determines the dimensions of the classifier's retina (see feature-map lesson in the tutorial on search functions) |
[in] | lambda | Ridge regression regularization constant. The default value 0.01 works well in most cases. May be slightly increased for very small numbers of training examples and slightly decreased for very large numbers of training examples. |
[in] | interpolate | Image interpolation mode for feature extraction. implies simple truncation of fractional coordinates, TRUE (recommended) implies bilinear interpolation. |
[out] | TestResult | Receives the handle to the test result container (see description of TTESTRESULT). |
TPolimagoTrainingError PMLeaveOutTestOnSil | ( | TSIL | sil, |
TProgress * | Progress, | ||
cvbval_t | HoldOutSize, | ||
TClassifierUsage | usage, | ||
const char * | szPreproCode, | ||
cvbval_t | featureResolution, | ||
double | lambda, | ||
cvbbool_t | interpolate, | ||
TTESTRESULT & | TestResult | ||
) |
Performs a leave-out-crossvalidation on the specified training data set.
In a leave-out-crossvalidation a number of training examples (holdout set) is removed from the data training set each on each step and is used for testing with a classifier that is generated from the rest of the training samples. The process is repeated until every example in the whole data set has been tested once.
[in] | sil | Specifies the training data set. |
[in] | Progress | Callback structure for progress report. May be used to show testing progress on the user interface (see description of TProgress). |
[in] | HoldOutSize | Number of examples to leave out on each pass. |
[in] | usage | Classifier usage (see description of TClassifierUsage). |
[in] | szPreproCode | Preprocessing code to be used for the training steps of the test. |
[in] | featureResolution | Determines the dimensions of the classifier's retina (see feature-map lesson in the tutorial on search functions) |
[in] | lambda | Ridge regression regularization constant. The default value 0.01 works well in most cases. May be slightly increased for very small numbers of training examples and slightly decreased for very large numbers of training examples. |
[in] | interpolate | Image interpolation mode for feature extraction. implies simple truncation of fractional coordinates, TRUE (recommended) implies bilinear interpolation. |
[out] | TestResult | Receives the handle to the test result container (see description of TTESTRESULT). |
cvbbool_t PMOpenTestResult | ( | const char * | szFileName, |
TTESTRESULT & | testResult | ||
) |
Loads the result of a sample test or a leave out test from a file.
If the test result can be successfully loaded from the given path its reference count will be initialized to 1 and a ReleaseObject
call (see CVCImg.dll reference) will be needed to release the memory occupied by the classifier.
[in] | szFileName | Pointer to a zero-terminated string containing the name of the file to be loaded. |
[out] | testResult | Receives the test result handle if the test result was loaded successfully. |
TRUE
if loading the test result from the specified path was successful, FALSE
if not cvbbool_t PMOpenTestResultW | ( | const wchar_t * | szFileName, |
TTESTRESULT & | testResult | ||
) |
Loads the result of a sample test or a leave out test from a file.
If the test result can be successfully loaded from the given path its reference count will be initialized to 1 and a ReleaseObject
call (see CVCImg.dll reference) will be needed to release the memory occupied by the classifier.
[in] | szFileName | Pointer to a zero-terminated string containing the name of the file to be loaded. |
[out] | testResult | Receives the test result handle if the test result was loaded successfully. |
TRUE
if loading the test result from the specified path was successful, FALSE
if not TPolimagoTrainingError PMSampleTestGeneric | ( | TLEARNINGDATAACCESS | db, |
TProgress * | Progress, | ||
TCLF | Clf, | ||
TTESTRESULT & | TestResult | ||
) |
Test a given classifier on test data available as generic data access.
Performs a sample test of a classifier on a set of learning data, i.e. every single example inside the learning set is classified using the classifier Clf
and the result is compared versus the sample's true label.
[in] | db | Handle of the training data set as returned by PMCreateLearningDataAccess. Note that the set of callbacks specified in the call to PMCreateLearningDataAccess must match the classifier's usage mode! |
[in] | Progress | Callback structure for progress report. Can be used to show training progress on the user interface (see description of the TProgress struct). |
[in] | Clf | Handle of the classifier to be used for testing. |
[out] | TestResult | Receives the handle of the aggregated test result (see description of TTESTRESULT). |
TPolimagoTrainingError PMSampleTestOnMts | ( | MTS | mts, |
TProgress * | Progress, | ||
TCLF | Clf, | ||
TTESTRESULT & | TestResult | ||
) |
Test a given classifier on test data available as a MTS (Minos Training Set).
Performs a sample test of a classifier on a minos training set, i.e. every single sample inside the training set is classified using the classifier Clf
and the result is compared versus the sample's true label.
[in] | mts | Handle of the training data set. |
[in] | Progress | Callback structure for progress report. Can be used to show training progress on the user interface (see description of the TProgress struct). |
[in] | Clf | Handle of the classifier to be used for testing. |
[out] | TestResult | Receives the handle of the aggregated test result (see description of TTESTRESULT). |
TPolimagoTrainingError PMSampleTestOnSil | ( | TSIL | sil, |
TProgress * | Progress, | ||
TCLF | Clf, | ||
TTESTRESULT & | TestResult | ||
) |
Test a given classifier on test data available as a SIL (Sample Image List).
Performs a sample test of a classifier on a sample image list, i.e. every single sample inside the sample image list is classified using the classifier Clf
and the result is compared versus the sample's true label.
[in] | sil | Handle of the training data set. |
[in] | Progress | Callback structure for progress report. Can be used to show training progress on the user interface (see description of the TProgress struct). |
[in] | Clf | Handle of the classifier to be used for testing. |
[out] | TestResult | Receives the handle of the aggregated test result (see description of TTESTRESULT). |
cvbbool_t PMSaveTestResult | ( | const char * | szFileName, |
TTESTRESULT | testResult | ||
) |
Save the result of a sample test or a leave out test to a file.
[in] | szFileName | Pointer to the zero-terminated string containing the file name to save the test result to. Note that existing files will be overwritten. |
[in] | testResult | Handle of the test result. |
TRUE
if saving the classifier to the specified path was successful, FALSE
if not cvbbool_t PMSaveTestResultW | ( | const wchar_t * | szFileName, |
TTESTRESULT | testResult | ||
) |
Save the result of a sample test or a leave out test to a file.
[in] | szFileName | Pointer to the zero-terminated string containing the file name to save the test result to. Note that existing files will be overwritten. |
[in] | testResult | Handle of the test result. |
TRUE
if saving the classifier to the specified path was successful, FALSE
if not