cc.mallet.cluster.neighbor_evaluator
Class MedoidEvaluator
java.lang.Object
cc.mallet.cluster.neighbor_evaluator.ClassifyingNeighborEvaluator
cc.mallet.cluster.neighbor_evaluator.MedoidEvaluator
- All Implemented Interfaces:
- NeighborEvaluator, java.io.Serializable
public class MedoidEvaluator
- extends ClassifyingNeighborEvaluator
Uses a Classifier
over pairs of Instances
to score
Neighbor
. Currently only supports AgglomerativeNeighbor
s.
- Since:
- 1.0
- Version:
- 1.0
- Author:
- "Michael Wick"
- See Also:
ClassifyingNeighborEvaluator
,
Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
MedoidEvaluator
public MedoidEvaluator(Classifier classifier,
java.lang.String scoringLabel)
- Parameters:
classifier
- Classifier to assign scores to Neighbor
s for which a pair of Instances has been merged.scoringLabel
- The predicted label that corresponds to a
positive example (e.g. "YES").combiningStrategy
- How to combine the pairwise scores
(e.g. max, mean, ...).mergeFirst
- If true, score all edges involved in a
merge. If false, only score the edges that cross the boundaries
of the clusters being merged.
MedoidEvaluator
public MedoidEvaluator(Classifier classifier,
java.lang.String scoringLabel,
boolean singleLink,
boolean mergeFirst)
evaluate
public double[] evaluate(Neighbor[] neighbors)
- Specified by:
evaluate
in interface NeighborEvaluator
- Overrides:
evaluate
in class ClassifyingNeighborEvaluator
- Returns:
- One score per neighbor. A higher score indicates that the
modified Clustering is preferred.
evaluate
public double evaluate(Neighbor neighbor)
- Specified by:
evaluate
in interface NeighborEvaluator
- Overrides:
evaluate
in class ClassifyingNeighborEvaluator
- Returns:
- A higher score indicates that the modified Clustering is preferred.
reset
public void reset()
- Description copied from interface:
NeighborEvaluator
- Reset the state of the evaluator.
- Specified by:
reset
in interface NeighborEvaluator
- Overrides:
reset
in class ClassifyingNeighborEvaluator
toString
public java.lang.String toString()
- Overrides:
toString
in class ClassifyingNeighborEvaluator