Class SimilarityBasedInitializationWithMedian<O>
- java.lang.Object
-
- elki.clustering.affinitypropagation.SimilarityBasedInitializationWithMedian<O>
-
- Type Parameters:
O
- Object type
- All Implemented Interfaces:
AffinityPropagationInitialization<O>
public class SimilarityBasedInitializationWithMedian<O> extends java.lang.Object implements AffinityPropagationInitialization<O>
Similarity based initialization.- Since:
- 0.6.0
- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description (package private) double
quantile
Quantile to use.(package private) Similarity<? super O>
similarity
Similarity function.-
Fields inherited from interface elki.clustering.affinitypropagation.AffinityPropagationInitialization
QUANTILE_ID
-
-
Constructor Summary
Constructors Constructor Description SimilarityBasedInitializationWithMedian(Similarity<? super O> similarity, double quantile)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TypeInformation
getInputTypeRestriction()
Get the data type information for the similarity computations.double[][]
getSimilarityMatrix(Relation<O> relation, ArrayDBIDs ids)
Compute the initial similarity matrix.
-
-
-
Field Detail
-
similarity
Similarity<? super O> similarity
Similarity function.
-
quantile
double quantile
Quantile to use.
-
-
Constructor Detail
-
SimilarityBasedInitializationWithMedian
public SimilarityBasedInitializationWithMedian(Similarity<? super O> similarity, double quantile)
Constructor.- Parameters:
similarity
- Similarity functionquantile
- Quantile
-
-
Method Detail
-
getSimilarityMatrix
public double[][] getSimilarityMatrix(Relation<O> relation, ArrayDBIDs ids)
Description copied from interface:AffinityPropagationInitialization
Compute the initial similarity matrix.- Specified by:
getSimilarityMatrix
in interfaceAffinityPropagationInitialization<O>
- Parameters:
relation
- Data relationids
- indexed DBIDs- Returns:
- Similarity matrix
-
getInputTypeRestriction
public TypeInformation getInputTypeRestriction()
Description copied from interface:AffinityPropagationInitialization
Get the data type information for the similarity computations.- Specified by:
getInputTypeRestriction
in interfaceAffinityPropagationInitialization<O>
- Returns:
- Data type
-
-