IClassifyGEN Interface

Provides access to members that control classification.

Description

Classify objects apply one of several methods to statistically subdivide a set of numeric values into classes.

The IClassifyGEN interface is implemented by all the data classification objects (DefinedInterval,**EqualInterval,**NaturalBreaks,**Quantile,**StandardDeviation); this is the interface used to pass in histogram data and then classify it into breaks. The ClassID and MethodName properties are used by user interface dialog boxes to identify the classification object and establish what the classification is called.

In general, to classify a dataset, use this interface together with IClassBreaksRenderer. Use the Classify method to add data to the classification; set the number of classes; and generate breaks****(typically use the same number of classes specified here for IClassBreaksRenderer.BreakCount). Then apply the classification to the renderer by cycling through ClassBreaks and setting each IClassBreaksRenderer.Break.

Members

Name Description
Read-only property ClassBreaks The array of class breaks (double). ClassBreaks(0) is the minimum value in the dataset, and subsequent breaks represent the upper limit of each class.
Read-only property ClassID The CLSID for the classification object.
Method Classify Classifies histogram data (array of values (doubles) and a paired array of frequencies (longs)) into the specified number of classes.
Read-only property MethodName The name of the classification method (based on choice of classification object).

IClassifyGEN.ClassBreaks Property

The array of class breaks (double). ClassBreaks(0) is the minimum value in the dataset, and subsequent breaks represent the upper limit of each class.

Public ReadOnly Property ClassBreaks As Object
public object ClassBreaks {get;}

Description

ClassBreaksreturns an array of class breaks. The number of breaks may be different than what was specified in theClassify method, so it is essential that you check this before setting the BreakCount on IClassBreaksRenderer . The reason this may be different has to do with how a particular classification method handles skewness in the data being classified.

The first ClassBreak returned is the minimum value of the data being classified. The rest of the breaks are the upper bounds for each class. The last break represents the upper bound of the highest class.

To properly assign ClassBreaks to an IClassBreaksRenderer:

1. Set IClassBreaksRenderer.MinimumBreak = IClassify.ClassBreaks(0)

2. Set IClassBreaksRenderer.Breaks(0) = IClassify.ClassBreaks(1)

3. Set IClassBreaksRenderer.Breaks(1) = IClassify.ClassBreaks(2)

etc.

Remarks

Note that the Breaks property array on the ClassBreaksRenderer has one less entry than the array returned from Classify. The first break value in the array returned from Classify is put into the ClassBreakRenderers� MinimumBreak property. Next, copy the break values into the ClassBreaksRenderer object. You can set up the symbol property of the classes at the same time.

IClassifyGEN.ClassID Property

The CLSID for the classification object.

Public ReadOnly Property ClassID As UID
public UID ClassID {get;}

Description

Returns the GUID of the classification object.

IClassifyGEN.Classify Method

Classifies histogram data (array of values (doubles) and a paired array of frequencies (longs)) into the specified number of classes.

Public Sub Classify ( _
    ByVal doubleArrayValues As Object, _
    ByVal longArrayFrequencies As Object, _
    ByRef numClasses As Integer _
)
public void Classify (
    object doubleArrayValues,
    object longArrayFrequencies,
    ref int numClasses
);

Description

Classifygenerates**theClassBreaks** based upon the numeric data passed and the number of classes specified.

Pass two safe arrays to the Classify method that must have the same number of elements and an index of zero for their first element. The first array (doubeArrayValues) is the numeric data values, defined as an array of double. This array must be sorted in increasing value order. The second array (longArrayFrequencies) represents the frequency of occurrence of the values, that is, an integer count of the number of times a value occurs.

For example, if the two arrays were called DataValues and DataFrequency, the lowest value would be stored in DataValue(0), and the number of times this value occurred would be stored in DataFrequency(0).

You could populate these arrays in code yourself, but if the data is available through the attribute field of a table, you can utilize the TableHistogram object to gather the data values and frequencies for you.

You must supply the number of desired classes as a variable defined as a Long. Some classification algorithms will return a different number of class breaks to what you specified. The number of classes will be written back to the variable you supplied, so it is always best to recheck the number of class breaks after calling Classify.

IClassifyGEN.MethodName Property

The name of the classification method (based on choice of classification object).

Public ReadOnly Property MethodName As String
public string MethodName {get;}

Description

MethodNamereturns the classification method name (as it appears in the classification dialog). Use to determine the CoClass currently implementing IClassifyGEN.

Classes that implement IClassifyGEN

Classes Description
DefinedInterval Defines a defined interval classification method.
EqualInterval Defines an equal interval classification method.
GeometricalInterval Defines a geometrical interval classification method.
NaturalBreaks Defines a natural breaks classification method.
Quantile Defines a quantile classification method.
StandardDeviation Defines a standard deviation classification method.

Remarks

The IClassifyGEN interface has been created to use in place of IClassify.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.