Description Usage Arguments Details Value Author(s) Examples

Finds a permutation of a matrix such that its Frobenius norm with another matrix is minimized.

1 |

`A` |
data matrix we want to permute |

`B` |
matrix whose distance with the permuted A we want to minimize. By
default, |

Finds the permutation P of A such that `||PA - B||`

is minimum in Frobenius
norm. Uses the linear-sum assignment problem (LSAP) solver in the package
`clue`

. The default B is the identity matrix of same dimension, so that the
permutation of A maximizes its trace. This procedure is useful for
constructing a confusion matrix when we don't know the true class labels of a
predicted class and want to compare to a reference class.

Permuted matrix such that it is the permutation of A closest to B

Ravi Varadhan: https://stat.ethz.ch/pipermail/r-help/2010-April/236664.html

1 2 3 |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.