classPiiConfusionMatrixBuilder
#include <PiiConfusionMatrixBuilder.h>
An operation that builds a confusion matrix out of classification results.
Inherits PiiDefaultOperation
Description
Optionally, it may also build a matrix of mean distances to the closest training sample, if the classifier provides such information.
Inputs
int.
int.
Outputs
Properties
|
The collected confusion matrix as a PiiVariant. |
|
|
Distance matrix holds average distances between classified samples and their closest training samples. |
Constructors and destructor
Public member functions
|
( )
|
|
|
( )
|
|
|
Q_INVOKABLE QString
|
Returns the confusion matrix as a text string that can be printed on console for illustration. |
|
void
|
|
|
void
|
|
Protected member functions
|
void
|
(
|
|
virtual void
|
( )
Executes one round of processing. |
Property details
-
PiiVariant confusionMatrix
[read, write]The collected confusion matrix as a PiiVariant.
The variant holds a PiiMatrix<int>. See PiiConfusionMatrix for a thorough explanation.
-
PiiVariant distanceMatrix
[read, write]Distance matrix holds average distances between classified samples and their closest training samples.
The structure is analogous to a confusion matrix, but instead of the number of occurrences, it holds the average distances. The sum of the matrix divided by the sum of the confusion matrix (the number of samples) is a measure of average quantization error. The distance matrix is stored as a PiiMatrix<double>.
Function details
-
PiiConfusionMatrixBuilder
() -
PiiVariant confusionMatrix
() -
PiiVariant distanceMatrix
() -
Q_INVOKABLE QString matrixAsText
Returns the confusion matrix as a text string that can be printed on console for illustration.
-
void setConfusionMatrix
-
void setDistanceMatrix
-
void check
(- int reset
[protected] -
virtual void process
()[protected, virtual]Executes one round of processing.
This function is invoked by the processor if the necessary preconditions for a new processing round are met. This function does all the necessary calculations to create output objects and sends them to output sockets.
Calls to process(), syncEvent(), and setProperty() are synchronized and cannot occur simultaneously. PiiDefaultOperation ensures this by locking processLock() for reading before calling process().
Note: With time-consuming operations, one should occasionally check that the operation hasn't been interrupted, i.e. that state() returns
Running.Exceptions
- PiiExecutionException
-
whenever an unrecoverable error occurs during a processing round, the operation is interrupted, or finishes execution due to end of input data.
Reimplemented from PiiDefaultOperation.
Add a note
Not a single note added yet. Be the first, add yours.