Computes the proportion of matching terms in two vectors of the same length. Used to compute the accuracy for prediction on test set.
Acc(Vec1, Vec2)
A vector of labels
Another vector of labels
Percentage of identical labels (accuracy)
# NOT RUN { Vec1 <- c(1,1,2,3,1) Vec2 <- c(1,2,2,3,1) Acc(Vec1,Vec2) # }
Run the code above in your browser using DataLab