jenksBreaks
jenksBreaks(
sorted,classes):number[]
Defined in: packages/core/src/classify/breaks.ts:190
Jenks natural-breaks thresholds — the classes that minimise the summed squared deviation from each class mean (Fisher’s exact optimisation, which Jenks’ iterative procedure approximates).
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
sorted | readonly number[] |
classes | number |
Returns
Section titled “Returns”number[]
Remarks
Section titled “Remarks”Computed with Wang & Song’s Ckmeans.1d.dp dynamic programme (2011), whose
divide-and-conquer fill is O(k·n·log n): a 100 000-feature layer takes
milliseconds, where the textbook Jenks matrices are O(k·n²). The fill
follows simple-statistics’ ckmeans (ISC licence, Tom MacWright and
contributors). Each threshold is the smallest value of its class.