%DeepSee.extensions.clusters.CLARA
Class %DeepSee.extensions.clusters.CLARA Extends PAM [ System = 4 ]
This class provides an implemantation of CLARA (Clustering for Large Applications) algorithm.
An obvious way of clustering larger datasets is to try and extend existing methods so that they can cope with a larger number of objects. The focus is on clustering large numbers of objects rather than a small number of objects in high dimensions. Kaufman and Rousseeuw (1990) suggested the CLARA (Clustering for Large Applications) algorithm for tackling large applications. CLARA extends their k-medoids approach or a large number of objects. It works by clustering a sample from the dataset and then assigns all objects in the dataset to these clusters.
CLARA (CLustering LARge Applications) relies on the sampling approach to handle large data sets. Instead of finding medoids for the entire data set, CLARA draws a small sample from the data set and applies the PAM algorithm to generate an optimal set of medoids for the sample. The quality of resulting medoids is measured by the average dissimilarity between every object in the entire data set D and the medoid of its cluster
To alleviate sampling bias, CLARA repeats the sampling and clustering process a pre-defined number of times and subsequently selects as the final clustering result the set of medoids with the minimal cost.
Properties
SampleSize
Property SampleSize As %Integer [ InitialExpression = 100 ];
Sample Size to use for one PAM run
UseSA
Property UseSA As %Boolean [ InitialExpression = 0 ];
Whether to use Simulated Annealing in each PAM run for a sample (not recommended).
CacheCost
Property CacheCost As %Integer [ InitialExpression = -1 ];
Unused in current implementation
Treshold
Property Treshold As %Double [ InitialExpression = 0.001 ];
Treshold to determine when to stop
NIdle
Property NIdle As %Integer [ InitialExpression = 5 ];
A minimum number of idle iterations (i.e. iterations that do not improve the total cost).
Methods
New
ClassMethod New(dsName As %String, Output sc As %Status) As CLARA
Open
ClassMethod Open(dsName As %String, Output sc As %Status) As CLARA
Create
ClassMethod Create(dsName As %String, new As %Boolean, Output sc As %Status) As CLARA [ Private ]
Prepare
Method Prepare() As %Status
IsPrepared
Method IsPrepared() As %Boolean
Execute
Method Execute() As %Status
ExecuteLoop
Method ExecuteLoop() As %Status [ Internal ]
CreateSample
Method CreateSample(tempds As %String, uniform As %Boolean, Output sc As %Status) As %DeepSee.extensions.clusters.PAM [ Internal ]
GenerateRandomSample
Method GenerateRandomSample(tempds As %String) As %Status [ Internal ]
GenerateUniformSample
Method GenerateUniformSample(tempds As %String) As %Status [ Internal ]
Merge
Method Merge(model As %DeepSee.extensions.clusters.PAM) As %Status [ Internal ]