Package elki.evaluation.clustering
Class EvaluateClustering
- java.lang.Object
-
- elki.evaluation.clustering.EvaluateClustering
-
- All Implemented Interfaces:
Evaluator
,ResultProcessor
public class EvaluateClustering extends java.lang.Object implements Evaluator
Evaluate a clustering result by comparing it to an existing cluster label.- Since:
- 0.4.0
- Author:
- Erich Schubert
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
EvaluateClustering.Par
Parameterization class.static class
EvaluateClustering.ScoreResult
Result object for outlier score judgements.
-
Field Summary
Fields Modifier and Type Field Description private static Logging
LOG
Logger for debug output.private boolean
noiseSpecialHandling
Apply special handling to noise "clusters".private ClusteringAlgorithm<?>
referencealg
Reference algorithm.private boolean
selfPairing
Use self-pairing in pair-counting measures
-
Constructor Summary
Constructors Constructor Description EvaluateClustering(ClusteringAlgorithm<?> referencealg, boolean noiseSpecialHandling, boolean selfPairing)
Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static double
evaluateRanking(ScoreEvaluation eval, Cluster<?> clus, DoubleDBIDList ranking)
Evaluate given a cluster (of positive elements) and a scoring list.protected void
evaluteResult(Database db, Clustering<?> c, Clustering<?> refc)
Evaluate a clustering result.private boolean
isReferenceResult(Clustering<?> t)
Test if a clustering result is a valid reference result.void
processNewResult(java.lang.Object newResult)
Process a result.
-
-
-
Field Detail
-
LOG
private static final Logging LOG
Logger for debug output.
-
referencealg
private ClusteringAlgorithm<?> referencealg
Reference algorithm.
-
noiseSpecialHandling
private boolean noiseSpecialHandling
Apply special handling to noise "clusters".
-
selfPairing
private boolean selfPairing
Use self-pairing in pair-counting measures
-
-
Constructor Detail
-
EvaluateClustering
public EvaluateClustering(ClusteringAlgorithm<?> referencealg, boolean noiseSpecialHandling, boolean selfPairing)
Constructor.- Parameters:
referencealg
- Reference clusteringnoiseSpecialHandling
- Noise handling flagselfPairing
- Self-pairing flag
-
-
Method Detail
-
evaluateRanking
public static double evaluateRanking(ScoreEvaluation eval, Cluster<?> clus, DoubleDBIDList ranking)
Evaluate given a cluster (of positive elements) and a scoring list.- Parameters:
eval
- Evaluation methodclus
- Cluster objectranking
- Object ranking- Returns:
- Score
-
processNewResult
public void processNewResult(java.lang.Object newResult)
Description copied from interface:ResultProcessor
Process a result.- Specified by:
processNewResult
in interfaceResultProcessor
- Parameters:
newResult
- Newly added result subtree.
-
evaluteResult
protected void evaluteResult(Database db, Clustering<?> c, Clustering<?> refc)
Evaluate a clustering result.- Parameters:
db
- Databasec
- Clusteringrefc
- Reference clustering
-
isReferenceResult
private boolean isReferenceResult(Clustering<?> t)
Test if a clustering result is a valid reference result.- Parameters:
t
- Clustering to test.- Returns:
true
if it is considered to be a reference result.
-
-