This class provides a base class for implementation for different Cluster Analysis algorithms.
It defines storage for clustering models and provides methods to retrieve information about data and clustering.
Cluster analysis or clustering is the assignment of a set of observations into subsets
(called clusters) so that observations in the same cluster are similar in some sense.
Clustering is a method of unsupervised learning, and a common technique for statistical
data analysis used in many fields, including machine learning, data mining, pattern recognition,
image analysis, information retrieval, and bioinformatics.
By Default model data is stored in ^CacheTemp globals.
The power to use in calculation of dissimilarity. Default is Euclidean distance (P=2).
Specify 1 for Manhattan Distance or 100 for Chebyshev distance (max between coordinates).
Returns the dissimilarity measure between two data points of the model. The method takes 4 arguments:
i, j - Ordinal number of the data points in the model
p - Optional, if specified the power for a Minkowski distance. Default is Euclidean distance (p=2).
Specify 1 for Manhattan Distance or 100 for Chebyshev distance (max between coordinates).
normalize - whether to normalize coordinates by their variances
Returns the dissimilarity measure between a data points of the model and a point with given coordinates.
The method takes 4 arguments:
i - The ordinal number of the data point in the model
z - The multidimensional coordinates of the second point: z(1), z(2), ..., z(dim)
p - Optional, if specified the power for a Minkowski distance. Default is Euclidean distance (p=2).
Specify 1 for Manhattan Distance or 100 for Chebyshev distance (max between coordinates).
normalize - whether to normalize coordinates by their variances
method Distance12(ByRef z1, ByRef z2, p As %Double = 2, normalize As %Boolean = 1) as %Double
Returns the dissimilarity measure between two points with given coordinates.
The method takes 4 arguments:
z1, z2 - The multidimensional coordinates of the points: z1(1), z1(2), ..., z1(dim)
p - Optional, if specified the power for a Minkowski distance. Default is Euclidean distance (p=2).
Specify 1 for Manhattan Distance or 100 for Chebyshev distance (max between coordinates).
normalize - whether to normalize coordinates by their variances
Returns an object that can calculate an index used in Cluster Validation
and determining the optimal number of clusters.
This method returns Average Silhouette Width index.
Returns an object that can calculate an index used in Cluster Validation
and determining the optimal number of clusters. This method returns Calinski-Harabasz index.
Returns the coordinates for the centroid for a given cluster.
Cluster is identified by its ordinal number k.
Coordinates are returned as multidimensional value: z(1), z(2), ..., z(dim)
Returns the dissimilarity measure as used by this clustering algorithm
between two data points of the model. Points are identified by their ordinal numbers.
Returns an object that can calculate an index used in Cluster Validation
and determining the optimal number of clusters.
This method returns Pearson-Gamma index which is a correlation coefficient
between distance between two points and a binary function whether they
belong to the same cluster. This index is useful when clustering is used
for dimension reduction i.e. the process of reducing the number of
random variables under consideration
method GlobalCentroid(Output z)
Returns the coordinates for the centroid for the whole dataset.
Coordinates are returned as multidimensional value: z(1), z(2), ..., z(dim)
Checks whether the model is ready for an analysis to be executed. This is dependent on a
specific algorithm and therefore this method is overriden by subclasses.
Returns the realtive cost of a given cluster relative to a medoid point m.
Cluster is identified by its ordinal number k.
Point m is identified by its ordinal number.
Sets the data to be associated with this model. The method takes 3 arguments:
rs - is a result set that provides the data. The first column returned by the result set
is assumed to be a unique Id of teh record. It is not used in any clustering algorithms but can be retrieved
by the application to identify the record. It can be a database %ID or any other value that
makes sense to the application. Other columns provide numerical values for the coordinates of the record
that are used by clustering algorithms.
Result Set must contain at least dim + 1 columns.
dim - The dimensionality of the model, i.e. the number of the coordinates
consumed by clustering algorithm.
nullReplacement - Optional, of specified this is a numeric replacement for empty values.