View source: R/som.nn.accuracy.R
som.nn.confusion | R Documentation |
Calculates the confusion matrix for a prediction result if the corresponding vector of true class labels is provided.
som.nn.confusion(x, class.labels)
x |
|
class.labels |
|
The confusion matrix (also called table of confusion) displays the number of predicted class labels for each actual class. Example:
pred. cat | pred. dog | pred. rabbit | unknown | |
actual cat | 5 | 3 | 0 | 0 |
actual dog | 2 | 3 | 1 | 0 |
actual rabbit | 0 | 2 | 9 | 2 |
The confusion matrix includes a column unknown
displaying the samples
for which no unambiguous prediction is possible.
data.frame
containing the confusion matrix.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.