Common helpers for model query interfaces.
Note you should generally be calling the model-specific query interfaces.
microscopes.common.query.groups(avec, sort=False)¶Turn an assignment vector in a clustering.
| Parameters: | avec : assignment vector sort : bool, default False
|
|---|---|
| Returns: | clustering : a list of lists
|
microscopes.common.query.zmatrix(assignments)¶microscopes.common.query.zmatrix_heuristic_block_ordering(zmat)¶Heuristically generate a permutation of the axes of zmat which results in block-diagonal sub-matrices.
| Parameters: | zmat : (N, N) ndarray |
|---|---|
| Returns: | order : (N,) ndarray
|
microscopes.common.query.zmatrix_reorder(zmat, order)¶Reorder a z-matrix given a permutation
| Parameters: | zmat : (N, N) ndarray order : (N,) ndarray |
|---|---|
| Returns: | reordered : (N, N) ndarray
|