URI: http://www.qualityml.org/1.0/metrics/CorrespondenceMatrix
Name: Correspondence matrix
Alternative names:
Definition:

Consider two classification models which assigns eath item to one category out of T and one category out of S, for instance a model which assigns images of a handwritten character to one of the 26 alphabetical characters ('a', 'b', 'c'...) and one of the S Greek alphabetical (alfa, beta, gamma...). The correspondence matrix is an T x S matrix which matches the first model categories (rows) against the second model categories (columns).

CM(t,s) = ( # items classified as class (t) in the first model classified and class (s) in the second model )

Parameters: max value
Source: ISO 19157
Categories: Thematic accuracy
Further information: Similar to http://www.uncertml.org/metrics/confusion-matrix
XML schema:
<schema xmlns:qml="http://www.qualityml.org/1.0" 
xmlns:un="http://www.uncertml.org/2.0" 
xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.qualityml.org/1.0" 
elementFormDefault="qualified" attributeFormDefault="unqualified">
<import namespace="http://www.uncertml.org/2.0" schemaLocation="../../uncertml/2.0/uncertml.xsd"/>

<element name="CorrespondenceMatrix" type="qml:CorrespondenceMatrixType" substitutionGroup="un:AbstractSummaryStatistic"/>
<complexType name="CorrespondenceMatrixType">
<complexContent>
<extension base="un:AbstractSummaryStatisticType">
<sequence>
<element name="categoriesT" type="un:CategoricalValuesType"/>
<element name="categoriesS" type="un:CategoricalValuesType"/>
<element name="values" type="un:ContinuousValuesType"/>
</sequence>
<attribute name="max" type="qml:nonNegativeRealNumber"/>
</extension>
</complexContent>
</complexType>

XML example:
<un:StatisticsCollection xmlns:qml="http://www.qualityml.org/1.0" 

   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 

   xsi:schemaLocation="http://www.qualitymlorg/schemas/qualityml/1.0/qualityml.xsd">

<qml:CorrespondenceMatrix max="100">
<qml:categoriesT>Red Green Blue</qml:categoriesT>
<qml:categoriesS>Red Green Blue</qml:categoriesS>
<qml:values>1.57 3.14 6.28 1.57 3.14 6.28 1.57 3.14 6.28</qml:values>
</qml:CorrespondenceMatrix>

JSON example:
N/A
API example:
N/A
Value constraints: categories: any string
counts: any positive natural number