Jenks Natural Breaks Simplified Classifier
Exact bounded one-dimensional dynamic-programming Jenks SSE partition, <=128 observations; deterministic earliest split ties, upper bounds may coincide.
Description
Partition up to 128 observations into Jenks classes minimizing within-class squared error.
Jenks classification seeks contiguous groups of sorted observations with small within-class squared deviations. The implemented bounded dynamic program computes a partition of the supplied sample rather than consulting preset thresholds.
When to use this tool
Partition up to 128 observations into Jenks classes minimizing within-class squared error. Use it when the input measurements and conventions below match the operation you need.
- Prepare observedValues, classes, respecting the measurement basis and boundaries below.
- Compare the worked example with your intended operation before reusing its result.
How to use the tool and how it works
- Enter every field in the input table using the stated units and exact supported selector spelling where applicable.
- Run the tool. Correct input errors before interpreting an output.
- Read the result fields below; use accompanying flags and the stated sign, boundary or model convention when interpreting a number.
The tool sorts 1 to 128 observations, requires an integer class count no greater than the sample size, computes candidate within-class sums of squares and uses dynamic programming to minimize their total. It returns class upper bounds, the total squared error and zero-based starts in the sorted sample.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| observedValues | Observed values. | List of finite numbers |
| classes | Classes. | Finite number |
| Output field | Interpretation |
|---|---|
| result | Object containing the following named result fields. |
| result.upperBounds | Upper bounds list, in the ordering described in the calculation. |
| result.withinClassSquaredError | Within class squared error; use the stated units and sign convention. |
| result.classStartIndices | Zero-based starting positions of the chosen groups in the sorted sample. |
{
"input": {
"observedValues": [
1,
2,
10,
11
],
"classes": 2
},
"output": {
"result": {
"upperBounds": [
2,
11
],
"withinClassSquaredError": 1,
"classStartIndices": [
0,
2
]
}
}
} Limitations and assumptions
- The partition depends on the supplied observations. Tied values and equal-cost solutions can yield ambiguous numerical thresholds; class start indices describe the selected partition, not original input positions.
- Every declared field is required and unexpected fields are rejected. Numeric inputs must be finite; input errors are distinct from a valid false result or an explicitly qualified output.
- Extremely large inputs and nonfinite or excessively large outputs are rejected. List positions reported by the tool use zero-based indices unless stated otherwise.
Alternative or Complementary methods
For a map-layout decision, inspect the rendered map at its intended size as well as its numerical dimensions. For classification or coordinate work, retain the chosen boundary and coordinate conventions with the result. Compare the scope of the nearby tools below before substituting one.
References
Similar or alternative tools
- Choropleth Class Break Quantiles Calculator
Type-7 linearly interpolated empirical quantile class boundaries; ties retained and no guaranteed equal member count.
- aspect octant classifier
Aspect Direction Octant Classifier from Slope Components: return downhill aspect, bearing degrees.