som.nn.all.accuracy {som.nn}R Documentation

Calculate overall accuracy

Description

Calculates the accuracy over all class lables for a prediction result if the corresponding vector of true class labels is provided.

Usage

som.nn.all.accuracy(x, class.labels)

Arguments

x

data.frame with the predictions as returned by the SOM.nn predict method.

class.labels

vector of correct class labels for the predictions.

Details

It is defined as

acc = (TP + TN) / total = sum(diag(cmat)) / sum(cmat)

with TP = true positives, TN = true negatives and total = total number of samples of a class. This is equivalent to the ratio of (correctly classified samples) / (total number of samples).

Value

one value overall accuracy.


[Package som.nn version 1.4.4 Index]