Home > Class Reference > %SYS namespace > %DeepSee.extensions.clusters.PAM

%DeepSee.extensions.clusters.PAM

class %DeepSee.extensions.clusters.PAM extends %DeepSee.extensions.clusters.AbstractModel

This class provides an implemantation of Partitioning Around Medoids (PAM) algorithm, a.k.a. K-Medoids (do not mix with K-Means).

The PAM algorithm was developed by Leonard Kaufman and Peter J. Rousseeuw, and this algorithm is very similar to K-means, mostly because both are partitional algorithms, in other words, both break the datasets into groups, and both works trying to minimize the error, but PAM works with Medoids, that are an entity of the dataset that represent the group in which it is inserted, and K-means works with Centroids, that are artificially created entity that represent its cluster.

The PAM algorithm partitionates a dataset of n objects into a number k of clusters, where both the dataset and the number k is an input of the algorithm. This algorithm works with a matrix of dissimilarity, where its goal is to minimize the overall dissimilarity between the representants of each cluster and its members.

Pure PAM algorithm only works when a dataset is well partitioned by its nature. It first generates a random solution and then uses the steepest descent to optimize it. Therefore it is prone to falling into local minimum. Two modifications implemented by subclasses PAMSA (PAM with Simulated Annealing) and CLARA (Clustering for Large Applications) try to alleviate this deficiency.

See Wikipedia article for more information.

Properties

property K as %Integer;
The number of clusters to create
Property methods: KDisplayToLogical(), KGet(), KIsValid(), KLogicalToDisplay(), KNormalize(), KSet()

Methods

method ClusterCost(k As %Integer) as %Double [ Language = objectscript ]
method CurrentTotalCost() [ Language = objectscript ]
method Execute() as %Status [ Language = objectscript ]
method IsPrepared() as %Boolean [ Language = objectscript ]
Inherited description: 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.
classmethod New(dsName As %String, Output sc As %Status) as PAM [ Language = objectscript ]
classmethod Open(dsName As %String, Output sc As %Status) as PAM [ Language = objectscript ]
method Prepare() as %Status [ Language = objectscript ]
method TotalCost() [ Language = objectscript ]

Inherited Methods

%AddToSaveSet() %OriginalNamespace() GetCost()
%ClassIsLatestVersion() %PackageName() GetCount()
%ClassName() %RemoveFromSaveSet() GetData()
%ConstructClone() %SerializeObject() GetDimensions()
%DispatchClassMethod() %SetModified() GetId()
%DispatchGetModified() %ValidateObject() GetNumberOfClusters()
%DispatchGetProperty() ById() GetPearsonGammaIndex()
%DispatchMethod() Delete() GlobalCentroid()
%DispatchSetModified() Distance() RelativeClusterCost()
%DispatchSetMultidimProperty() Distance1() Reset()
%DispatchSetProperty() Distance12() SetData()
%Extends() Exists() SubsetCentroid()
%GetParameter() GeneratePMML() iterateCluster()
%IsA() GetASWIndex() printAll()
%IsModified() GetCalinskiHarabaszIndex() printCluster()
%New() GetCentroid() randomSubset()
%NormalizeObject() GetCluster()
%ObjectModified() GetClusterSize()

Subclasses

%DeepSee.extensions.clusters.CLARA %DeepSee.extensions.clusters.PAMSA