Skip to main content

This documentation is for an older version of this product. See the latest version of this content.Opens in a new tab

%DeepSee.extensions.clusters.Ordered

class %DeepSee.extensions.clusters.Ordered extends %Library.RegisteredObject

This class provides cluster analysis for a set of ordered objects. One can also think of it as one-dimensional cluster analysis.

Methods in this class divide the set into a given number of subsets trying to optimize a given target value. Target value can be:

Method Inventory

Methods

classmethod ordered(m As %Integer, ByRef key, nc As %Integer, Output q) as %Status
This method clusters one-dimensional ordered data into nc clusters.

The algorithm is described in:
Helmuth Spaeth,
Cluster Analysis Algorithms for Data Reduction and Classification of Objects,
Ellis Horwood, 1980, page 63, QA278 S6813.

Input data is given as a multidimensional array m. The top value of m must be the number of data objects in the array. The array contains numerical values m(1:m) for each object.

In most cases key should be an empty string. In such a case all calculations are done in memory. If key has value then this value is used as a subscript ot a process private globals that hold intermediate results. This will make the calculations significantly slower but will allow to deal with larger amount of objects.

The result is returned in teh form of multi-dimensional array q. q(1:nc,1:nc), describes the clusters of data. The last row of q stores the first element in each cluster. Thus cluster 1 contains data items q(nc,1) through q(nc,2)-1. Other information is contained in previous rows. In particular, in row J, columns 1 through J, there is similar information about a partition involving J clusters.

classmethod pg(m As %Integer, nc As %Integer, ByRef key, ByRef q, ByRef sc As %Status) as %Double
This method calculates Pearson-Gamma correlation coefficent for clustering obtained by method ordered(). Input data is taken in the same way as by ordered() method.

For more information about Pearson-Gamma correlation coefficent see PearsonGamma

classmethod print(m As %Integer, nc As %Integer, ByRef key, ByRef q)
This method prints verbose information about clustering results obtained by method ordered(). Input data is taken in the same way as by ordered() method.

Inherited Members

Inherited Methods

FeedbackOpens in a new tab