som.nn.accuracy {som.nn} | R Documentation |
Calculate accuracy measures
Description
Calculates the sensitivity, specificity and overall accuracy for a prediction result if the corresponding vector of true class labels is provided.
Usage
som.nn.accuracy(x, class.labels)
Arguments
x |
|
class.labels |
|
Details
Sensitivity is the classifier's ability to correctly identify samples of a specific class A. It is defined as
with TP = true positives and FN = false negatives. This is equivalent to the ratio of (correctly identified samples of class A) / (total number of samples of class A).
Specificity is the classifier's ability to correctly identify samples not of a specific class A. It is defined as
with TN = true negatives and FP = false positives. This is equivalent to the ratio of (correctly identified samples not in class A) / (total number of samples not in class A).
Accuracy is the classifier's ability to correctly classify samples of a specific class A. It is defined as
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
data.frame
containing sensitivity, specificity and accuracy for all
class labels in the data set.