knee_index
Note
This page is a reference documentation. It only explains the function signature, and not how to use it. Please refer to the Habitat Guide and Python API guide (v2.0) for usage.
- knee_index(scores: Sequence[float]) int[source]
Locate the knee of a convex, decreasing score curve (Kneedle).
Inertia curves fall steeply and then flatten; the knee is the point past which extra clusters buy little. Endpoints are never returned because the first and last candidate are not meaningful knees, and a curve too short or too flat for Kneedle falls back to its minimum.
- Parameters:
scores – Score per candidate cluster count, in ascending count order.
- Returns:
Index into
scoresof the selected candidate.