This module helps you plot confusion matrices or similar images where
the axis labels do not have a natural order. So, the probability of
confusing two phonemes is a perfect example: phonemes do not naturally
fall onto a 1-dimensional sequence, so one is free to put them in any
order one likes. Given that, one might as well put them into an order
that reveals something interesting about the probabilities.
All the functions ending in "2" work on rectangular arrays.
All the functions without "2" work only on square arrays, and
they assume that that both axes remain in the same order.
|
|
|
|
tuple(numpy.ndarray, list(something))
|
swap_toward_diag(m,
lbls,
maxtries=None,
sign=1)
Swap the rows and columns of a matrix to bring it closer to a
diagonal matrix: i.e. |
source code
|
|
tuple(numpy.ndarray, list(something))
|
swap_toward_positive(m,
lbls,
maxtries=None,
sign=1)
Swap the rows and columns of a matrix to put the most positive values
on the main diagonal. |
source code
|
|
tuple(numpy.ndarray, list(something), list(something))
|
|
|
pos_near_diag2(m,
lbl1,
lbl2,
maxtries=None) |
source code
|
|
|
neg_near_diag2(m,
lbl1,
lbl2,
maxtries=None) |
source code
|
|
tuple(numpy.ndarray, list(something), list(something))
|
swap_toward_blocks2(m,
lbl1,
lbl2,
maxtries=None)
Swap rows and columns of a matrix to bring it closer to a block form,
where similar values occur together in blocks. |
source code
|
|
tuple(numpy.ndarray) , list(something))
|
swap_toward_blocks(m,
lbls,
maxtries=None)
Swap rows and columns of a matrix to bring it closer to a block form,
where similar values occur together in blocks. |
source code
|
|
|
|
|
|