Skip to content

Instantly share code, notes, and snippets.

View gbpcosta's full-sized avatar

Gabriel de Barros Paranhos da Costa gbpcosta

View GitHub Profile
@lebedov
lebedov / maximize_matrix_trace.py
Created June 16, 2015 18:35
Find permutation of matrix that maximizes its trace using the Munkres algorithm.
#!/usr/bin/env python
"""
Find permutation of matrix that maximizes its trace using the Munkres algorithm.
Reference
---------
https://stat.ethz.ch/pipermail/r-help/2010-April/236664.html
"""