Package elki.clustering.kmeans.quality
Class BayesianInformationCriterionZhao
- java.lang.Object
-
- elki.clustering.kmeans.quality.AbstractKMeansQualityMeasure<NumberVector>
-
- elki.clustering.kmeans.quality.BayesianInformationCriterionZhao
-
- All Implemented Interfaces:
KMeansQualityMeasure<NumberVector>
@Reference(authors="Q. Zhao, M. Xu, P. Fr\u00e4nti", title="Knee Point Detection on Bayesian Information Criterion", booktitle="20th IEEE International Conference on Tools with Artificial Intelligence", url="https://doi.org/10.1109/ICTAI.2008.154", bibkey="DBLP:conf/ictai/ZhaoXF08") public class BayesianInformationCriterionZhao extends AbstractKMeansQualityMeasure<NumberVector>
Different version of the BIC criterion.Reference:
Q. Zhao, M. Xu, P. Fränti
Knee Point Detection on Bayesian Information Criterion
20th IEEE International Conference on Tools with Artificial Intelligence- Since:
- 0.7.0
- Author:
- Tibor Goldschwendt, Erich Schubert
-
-
Constructor Summary
Constructors Constructor Description BayesianInformationCriterionZhao()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isBetter(double currentCost, double bestCost)
Compare two scores.static double
logLikelihoodZhao(Relation<? extends NumberVector> relation, Clustering<? extends MeanModel> clustering, NumberVectorDistance<?> distance)
Computes log likelihood of an entire clustering.<V extends NumberVector>
doublequality(Clustering<? extends MeanModel> clustering, NumberVectorDistance<? super V> distance, Relation<V> relation)
Calculates and returns the quality measure.-
Methods inherited from class elki.clustering.kmeans.quality.AbstractKMeansQualityMeasure
logLikelihood, numberOfFreeParameters, numPoints, varianceContributionOfCluster
-
-
-
-
Method Detail
-
quality
public <V extends NumberVector> double quality(Clustering<? extends MeanModel> clustering, NumberVectorDistance<? super V> distance, Relation<V> relation)
Description copied from interface:KMeansQualityMeasure
Calculates and returns the quality measure.- Type Parameters:
V
- Actual vector type (could be a subtype of O!)- Parameters:
clustering
- Clustering to analyzedistance
- Distance function to use (usually Euclidean or squared Euclidean!)relation
- Relation for accessing objects- Returns:
- quality measure
-
logLikelihoodZhao
public static double logLikelihoodZhao(Relation<? extends NumberVector> relation, Clustering<? extends MeanModel> clustering, NumberVectorDistance<?> distance)
Computes log likelihood of an entire clustering.Version as used by Zhao et al.
- Parameters:
relation
- Data relationclustering
- Clusteringdistance
- Distance function- Returns:
- Log Likelihood.
-
isBetter
public boolean isBetter(double currentCost, double bestCost)
Description copied from interface:KMeansQualityMeasure
Compare two scores.- Parameters:
currentCost
- New (candiate) cost/scorebestCost
- Existing best cost/score (may beNaN
)- Returns:
true
when the new score is better, or the old score isNaN
.
-
-