org.geotoolkit.image.classification

Class Classification

• ```public class Classification
extends Object```

Define and compute two sort of data classifications.
Quantile classification.
Quantile classification is the most basic classification.
Algorithm divide in some equal parts(at best, if its possible) all data.

Jenks classification.
Jenks method is the most effective, but also most costly in computing terms.
For each case, in first time, the algorithm computes the "intra-class variance" ie the average of the variances of each of the classes.
A second step, consist to calculates the "inter-class variance", ie the variance of each of the generated classes.
The aim is thus to minimize the "intra-class variance" so that each elements group has generated individuals who "look at best" and maximize the "inter-class variance" in order to obtain the most dissimilar classes possible.

Data will aren't sort in ascending order.

Code example :

`Classification classify = new Classification();`
`classify.setData(double[]data);`
`classify.setClassNumber(5);`
`classify.computeQuantile();`
`or`
`classify.computeJenks();`
`//results in two forms`
`classify.getIndex();`
`classify.getClasses();`

Author:
Rémi Marechal (Geomatys).
• Constructor Summary

Constructors
Constructor and Description
`Classification()`
Define and compute two sort of data classifications.
• Method Summary

All Methods
Modifier and Type Method and Description
`void` `computeJenks()`
Class data from Jenks method.
`void` `computeJenks(boolean checkData)`
Class data from Jenks method.
`void` `computeQuantile()`
Class data from quantile method.
`List<double[]>` `getClasses()`
Return classification result.
`int[]` `getIndex()`
Return classes separation index from `data` table.
`void` `setClassNumber(int classNumber)`
Set class number.
`void` `setData(double... data)`
Set data which will be classified.
• Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`
• Constructor Detail

• Classification

`public Classification()`
Define and compute two sort of data classifications.
Quantile classification.
Jenks classification.
• Method Detail

• computeQuantile

`public void computeQuantile()`
Class data from quantile method.
• computeJenks

`public void computeJenks()`
Class data from Jenks method.
• computeJenks

`public void computeJenks(boolean checkData)`
Class data from Jenks method.
• getClasses

`public List<double[]> getClasses()`
Return classification result.
Returns:
classification result.
• getIndex

`public int[] getIndex()`

Return classes separation index from `data` table.

for example : caller want class 10 data in 3 distinct class.
first class second class third class
   ...      ...   
With ending index is exclusive.

Returns:
classes separation index from `data` table.
• setData

`public void setData(double... data)`
Set data which will be classified.
Parameters:
`data` - which will be classified.
• setClassNumber

`public void setClassNumber(int classNumber)`
Set class number.
Parameters:
`classNumber` - class number ask by caller.