create_order_function#

tangles.convenience.create_order_function(name: str, mat: ndarray | DataFrame) Callable[[ndarray], ndarray]#

Create a standard order function given by name.

Parameters#

name: str
The name of an order function, currently supported: “O1”-“O5” (see tangles-book), “O1-biased” (see tangles book),

“cut”, “ratiocut”, “normcut”

mat: np.ndarray

Data used to compute the order. This is either a set of features/advanced features or a similarity matrix (depending on the type of order function, see :order_works_on_features)

Returns#

SetSeparationOrderFunction:

a callable implementing the chosen order function