
V - Vector typeD - Distance typeM - Model typepublic class BestOfMultipleKMeans<V extends NumberVector<?>,D extends Distance<?>,M extends MeanModel<V>> extends AbstractAlgorithm<Clustering<M>> implements KMeans<V,D,M>
| Modifier and Type | Class and Description |
|---|---|
static class |
BestOfMultipleKMeans.Parameterizer<V extends NumberVector<?>,D extends Distance<D>,M extends MeanModel<V>>
Parameterization class.
|
| Modifier and Type | Field and Description |
|---|---|
private KMeans<V,D,M> |
innerkMeans
Variant of kMeans for the bisecting step.
|
private static Logging |
LOG
The logger for this class.
|
private KMeansQualityMeasure<? super V,? super D> |
qualityMeasure
Quality measure which should be used.
|
private int |
trials
Number of trials to do.
|
INIT_ID, K_ID, MAXITER_ID, SEED_IDDISTANCE_FUNCTION_ID| Constructor and Description |
|---|
BestOfMultipleKMeans(int trials,
KMeans<V,D,M> innerkMeans,
KMeansQualityMeasure<? super V,? super D> qualityMeasure)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
DistanceFunction<? super V,D> |
getDistanceFunction()
Returns the distanceFunction.
|
TypeInformation[] |
getInputTypeRestriction()
Get the input type restriction used for negotiating the data query.
|
protected Logging |
getLogger()
Get the (STATIC) logger for this class.
|
Clustering<M> |
run(Database database,
Relation<V> relation)
Run the clustering algorithm.
|
void |
setDistanceFunction(PrimitiveDistanceFunction<? super NumberVector<?>,D> distanceFunction)
Set the distance function to use.
|
void |
setK(int k)
Set the value of k.
|
makeParameterDistanceFunction, runclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitrunprivate static final Logging LOG
private int trials
private KMeans<V extends NumberVector<?>,D extends Distance<?>,M extends MeanModel<V>> innerkMeans
private KMeansQualityMeasure<? super V extends NumberVector<?>,? super D extends Distance<?>> qualityMeasure
public Clustering<M> run(Database database, Relation<V> relation)
KMeanspublic TypeInformation[] getInputTypeRestriction()
AbstractAlgorithmgetInputTypeRestriction in interface AlgorithmgetInputTypeRestriction in class AbstractAlgorithm<Clustering<M extends MeanModel<V>>>public DistanceFunction<? super V,D> getDistanceFunction()
DistanceBasedAlgorithmgetDistanceFunction in interface DistanceBasedAlgorithm<V extends NumberVector<?>,D extends Distance<?>>public void setK(int k)
KMeanspublic void setDistanceFunction(PrimitiveDistanceFunction<? super NumberVector<?>,D> distanceFunction)
KMeanssetDistanceFunction in interface KMeans<V extends NumberVector<?>,D extends Distance<?>,M extends MeanModel<V>>distanceFunction - Distance function.protected Logging getLogger()
AbstractAlgorithmgetLogger in class AbstractAlgorithm<Clustering<M extends MeanModel<V>>>