R/recall_accuracy.R

Defines functions recall_accuracy

Documented in recall_accuracy

recall_accuracy <- function(true_labels, predicted_labels) 
{
	true_labels <- as.vector(true_labels)
	predicted_labels <- as.vector(predicted_labels,mode=class(true_labels))
	analyze <- predicted_labels == true_labels

	accuracy <- length(analyze[analyze == TRUE])/length(true_labels)
	return(accuracy)
}

Try the RTextTools package in your browser

Any scripts or data that you put into this service are public.

RTextTools documentation built on April 26, 2020, 9:05 a.m.