opt_colpermB | R Documentation |
Useful in simulations where the posterior sampling relabels the classes, which is equivalent and cannot be told apart by the likelihood only.
opt_colpermB(A, B)
A |
a matrix (e.g., truth) |
B |
another matrix (e.g., estimated); A and B must have the same dimensions; B's columns may be permutated to best match those of A. |
a permutation of columns of B (represented by a permuted 1:ncol(A)
)
A <- matrix(c(1,2,3,4,5,6),nrow=2,ncol=3) B <- A[,c(2,1,3)] opt_colpermB(A,B) # should expect c(2,1,3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.