ClassifyNonzeroJenksFisher

Classify functions ClassifyNonzeroJenksFisher

syntax

Since GeoDMS 20.20.0 the second form classifies a value-count table that was calculated before, with values and count the two [[subitem sub items]] of a weeded_counts result. Use it when more than one result is derived from the same scan of a, since the [[calculation cache]] then calculates that scan once; the GeoDMS GUI uses it for the classification it generates for a map layer without a configured Classification. Below 4096 distinct values it gives the same class breaks as the two argument form; above it they can differ, because weeded_counts merges values that the two argument form counts separately.

definition

ClassifyNonzeroJenksFisher(a, domain unit) results in a Data item with class breaks, based on the method described in Fisher’s Natural Breaks Classification complexity proof. The resulting Values unit is the values unit of data item a, the resulting Domain unit is the domain unit Argument.

  • a: numeric data item to be classified
  • domain unit: determining the number of class breaks.

This Nonzero version of this function classifies the positive and negative values separately. The value 0 is treated as a special value, it is a compulsory class break. The numbers of classes for the positive and the negative values, within the total number of classes, are chosen in a manner that minimizes the sum of the square deviations from the class means.

description

The Jenks Fisher classification method is a fast algorithm that results in breaks that minimize the sum of the square deviations from the class means, also known as natural breaks. The self-contained code with an example usage is: CalcNaturalBreaks

The same function can also be applied from the GUI by requesting the Palette Editor of a map layer and activating the Classify > JenksFisher classification.

The ClassifyNonzeroJenksFisher results in a set of ClassBreaks that can be used in the Classify function to classify a data item.

applies to

  • data item a with Numeric Value type
  • domain unit with value type from group CanBeDomainUnit

since version

7.019

example

attribute<nrPersons> classifyNZJfNrInh  (inh_4K) := ClassifyNonzeroJenksFisher(NrInh, inh_4K);
classifyNZJfNrInh
0
2
300
750

Table inh_4K, nr of rows = 4

NrInh
550
1025
300
200
0
null
300
2
20
55
860
1025
1025
100
750

Table District, nr of rows = 15

see also