compat.v0.Cluster¶
- class compat.v0.Cluster(radial: bool = True, box: bool = False)¶
Bases:
object
Base cluster class.
Methods
__init__
([radial, box])Cluster constructor.
add_point
(x[, i])Adds a point to the cluster.
avg_distance
(x[, norm_ord])Gets the average distance of a point.
center_distance
(x[, norm_ord])Gets the center distance of a point.
min_distance
(x[, norm_ord])Calculates the minimum distance to the nearest cluster.
Checks if a point is within a bounding box.
- add_point(x: ndarray, i: int | None = None)¶
Adds a point to the cluster.
- Parameters:
x (np.ndarray) – TODO
i (Optional[int]) – TODO
- avg_distance(x: ndarray, norm_ord: int | None = 2) float ¶
Gets the average distance of a point.
- Parameters:
x (np.ndarray) – TODO
norm_ord (Optional[int]) – TODO
- center_distance(x: ndarray, norm_ord: int | None = 2)¶
Gets the center distance of a point.
- Parameters:
x (np.ndarray) – TODO
norm_ord (Optional[int]) – TODO
- min_distance(x: ndarray, norm_ord: int | None = 2)¶
Calculates the minimum distance to the nearest cluster.
- Parameters:
x (np.ndarray) – TODO
norm_ord (Optional[int]) – TODO
- within_bounding_box(x: ndarray)¶
Checks if a point is within a bounding box.
- Parameters:
x (np.ndarray) – TODO