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

  1. Enter every field in the input table using the stated units and exact supported selector spelling where applicable.
  2. Run the tool. Correct input errors before interpreting an output.
  3. 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 fieldMeaning and unitsAccepted input
observedValuesObserved values.List of finite numbers
classesClasses.Finite number
Output fieldInterpretation
resultObject containing the following named result fields.
result.upperBoundsUpper bounds list, in the ordering described in the calculation.
result.withinClassSquaredErrorWithin class squared error; use the stated units and sign convention.
result.classStartIndicesZero-based starting positions of the chosen groups in the sorted sample.
json
{
  "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

  1. Tool behavior and example: Jenks Natural Breaks Simplified Classifier — tool.io

Similar or alternative tools

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies