TPR | R Documentation |
This is a function that compares the structure of two matrices A and B. It outputs the number of entries that A and B have in common that are different from zero. A and B need to have the same number of rows and columns
TPR(A, B, tol = 1e-04)
A |
A matrix (the estimator). |
B |
A matrix (assumed to be the ground truth). |
tol |
tolerance for declaring the entries non zero. |
True Positive Rate (nb of values that are non zero in both A and B / (nb of values that are non zero in A))
A <- matrix(c(1, 0, 0, 1, 1, 0), nrow = 2)
B <- matrix(c(1, 0, 1, 1, 0, 0), nrow = 2)
TPR(A, B)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.