compute_corner_features#
- tangles.convenience.convenience_features.compute_corner_features(features: ndarray, min_side_size: float = 0, min_side_size_is_fraction: bool = False, order_func: Callable[[ndarray], ndarray] = None, max_order_factor: float = 1.0, global_max_order: float = inf) Tuple[ndarray, ndarray] #
Compute corners of features/separations given as numpy array of oriented indicator vectors (i.e. -1/1-vectors)
Parameters#
- featuresnp.ndarray
A bunch of features.
- min_side_sizefloat
Discard corners with minimum size smaller than min_side_size (or min_side_size*datasize if min_side_size_is_fraction is True). This parameter can be used to control the balance.
- min_side_size_is_fractionbool
If True, the parameter min_side_size is interpreted as a fraction of the data set size.
- order_funcSetSeparationOrderFunction or None
an order function
- max_order_factor: float
Discard corners of two features with an order greater than max_order_factor times the greater order of the two features.
- global_max_order: float
Discard corners that have an order greater than this value
Returns#
- Tuple[np.ndarray, list]:
an array containing the corners and a list of the same length containing tuples ((index1, orientation1), (index2, orientation2)) which of the original features went into each of the resulting corners.