jsat.clustering.dissimilarity
Interface UpdatableClusterDissimilarity
-
- All Superinterfaces:
- ClusterDissimilarity
- All Known Implementing Classes:
- AverageLinkDissimilarity, CentroidDissimilarity, CompleteLinkDissimilarity, LanceWilliamsDissimilarity, MedianDissimilarity, SingleLinkDissimilarity, WardsDissimilarity
public interface UpdatableClusterDissimilarity extends ClusterDissimilarity
This interface extends the contract of aClusterDissimilarityfor more efficient computation. This contract indicates that the dissimilarity measure being used can be computed in an online fashion, and that the dissimilarity matrix can be updated to reflect the dissimilarity for a new merged cluster.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description UpdatableClusterDissimilarityclone()doubledissimilarity(int i, int ni, int j, int nj, double[][] distanceMatrix)Provides the notion of dissimilarity between two sets of points, that may not have the same number of points.doubledissimilarity(int i, int ni, int j, int nj, int k, int nk, double[][] distanceMatrix)Provides the notion of dissimilarity between two sets of points, that may not have the same number of points.-
Methods inherited from interface jsat.clustering.dissimilarity.ClusterDissimilarity
dissimilarity, dissimilarity, distance
-
-
-
-
Method Detail
-
dissimilarity
double dissimilarity(int i, int ni, int j, int nj, double[][] distanceMatrix)Provides the notion of dissimilarity between two sets of points, that may not have the same number of points. This is done using a matrix containing all pairwise distance computations between all points. This distance matrix will then be updated at each iteration and merging, leaving empty space in the matrix. The updates will be done by the clustering algorithm. Implementing this interface indicates that this dissimilarity measure can be accurately computed in an updatable manner that is compatible with a Lance–Williams update.- Parameters:
i- the index of cluster i's distance in the original data setni- the number of items in the cluster represented by ij- the index of cluster j's distance in the original data setnj- the number of items in the cluster represented by jdistanceMatrix- a distance matrix originally created byAbstractClusterDissimilarity.createDistanceMatrix(jsat.DataSet, jsat.clustering.dissimilarity.ClusterDissimilarity)- Returns:
- a value >= 0 that describes the dissimilarity of the two clusters. The larger the value, the more different the two clusterings are.
-
dissimilarity
double dissimilarity(int i, int ni, int j, int nj, int k, int nk, double[][] distanceMatrix)Provides the notion of dissimilarity between two sets of points, that may not have the same number of points. This is done using a matrix containing all pairwise distance computations between all points. This distance matrix will then be updated at each iteration and merging, leaving empty space in the matrix. The updates will be done by the clustering algorithm. Implementing this interface indicates that this dissimilarity measure can be accurately computed in an updatable manner that is compatible with a Lance–Williams update.
This computes the dissimilarity of the union of clusters i and j, (Ci ∪ Cj), with the cluster k. This method is used by other algorithms to perform an update of the distance matrix in an efficient manner.- Parameters:
i- the index of cluster i's distance in the original data setni- the number of items in the cluster represented by ij- the index of cluster j's distance in the original data setnj- the number of items in the cluster represented by jk- the index of cluster k's distance in the original data setnk- the number of items in the cluster represented by k a distance matrix originally created byAbstractClusterDissimilarity.createDistanceMatrix(jsat.DataSet, jsat.clustering.dissimilarity.ClusterDissimilarity)- Returns:
- a value >= 0 that describes the dissimilarity of the union of two clusters with a third cluster. The larger the value, the more different the resulting clusterings are.
-
clone
UpdatableClusterDissimilarity clone()
- Specified by:
clonein interfaceClusterDissimilarity
-
-
DataMelt 3.0 © DataMelt by jWork.ORG