6Module rml/resultsπ i
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:
> (defineresults(make-result-matrixdataset))
> (for-eachdisplayln(result-matrix-formattedresults))
(true ω predIris-versicolorIris-virginica Iris-setosa )
6.1Types and Predicatesπ i
( result-matrix?a)→boolean?
Returns #f if the value of a is a result-matrix.
6.2Constructionπ i
( make-result-matrixdataset)→result-matrix?
Create a new
result-matrix using the values provided by
(classifier-product dataset) as row and column
indices.
6.3Recording Resultsπ i
( record-resultCtrue-ωpredicted-ω)→result-matrix?
C:result-matrix?
Increment the result count for in the result-matrix for the combination
of predicted and true/known classifiers.
( result-valueCtrue-ωpredicted-ω)→integer?
C:result-matrix?
Return the current result count in result-matrix for the combination
of predicted and true/known classifiers.
( result-matrix-formatted)→result-matrix?
Return a formatted version of the result matrix with label data suitable for display
or printing.