6 Module rml/results
(require rml/results) | package: rml-core |
This packages implements a results matrix, sometimes referred to as a confusion matrix to record the outcome of classification operations. Specifically the matrix uses all distinct classification values (ω) as both rows and columns and maps the predicted values to the labeled values incrementing the integer value at the intersection for each operation.
Examples:
> (define results (make-result-matrix dataset)) > (for-each displayln (result-matrix-formatted results))
(true ω pred Iris-versicolor Iris-setosa Iris-virginica )
(Iris-versicolor 0 0 0 )
(Iris-setosa 0 0 0 )
(Iris-virginica 0 0 0 )
6.1 Types and Predicates
predicate
a : any/c
Returns #f if the value of a is a result-matrix.
6.2 Construction
constructor
dataset : data-set?
Create a new result-matrix using the values provided by
(classifier-product dataset) as row and column
indices.
6.3 Recording Results
Increment the result count for in the result-matrix for the combination
of predicted and true/known classifiers.
Return the current result count in result-matrix for the combination
of predicted and true/known classifiers.
Return a formatted version of the result matrix with label data suitable for display
or printing.