powered by
For finding the accuracy of confusion matricies with true/pred values
Percent(true, test)
The true values
the test values
the percent acc.
Make sure your strings have the right values and create a square matrix.
# NOT RUN { true <- rep(1:10, 10) test <- rep(1:10, 10) test[c(2, 22, 33, 89)] = 1 Percent(true, test) #or #percent(table(true, test)) # }
Run the code above in your browser using DataLab