Randomly permute both rows and columns in the matrix.
Randomly permutes the ordering of rows and columns in the matrix. The same permutation is applied to both rows and columns in order to maintain symmetry and hollowness. Only the rows/columns in the distance matrix are permuted; the IDs are not permuted.
Parameters: | condensed : bool, optional
|
---|---|
Returns: | DistanceMatrix or ndarray
|
See also
Notes
This method does not modify the distance matrix that it is called on. It is more efficient to pass condensed=True than permuting the distance matrix and then converting to condensed format.