cc.mallet.cluster.neighbor_evaluator
Class RankingNeighborEvaluator
java.lang.Object
cc.mallet.cluster.neighbor_evaluator.ClassifyingNeighborEvaluator
cc.mallet.cluster.neighbor_evaluator.RankingNeighborEvaluator
- All Implemented Interfaces:
- NeighborEvaluator, java.io.Serializable
public class RankingNeighborEvaluator
- extends ClassifyingNeighborEvaluator
Uses a Classifier
that scores an array of Neighbor
s. The Classifier expects Instance
s with data
equal to an array of Neighbor
s. The labeling of each
Instance is a set of Integer
s, with labeling i
corresponding the likelihood that Neighbor
i is the "best"
Neighbor
.
- Since:
- 1.0
- Version:
- 1.0
- Author:
- "Aron Culotta"
- See Also:
ClassifyingNeighborEvaluator
,
Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
RankingNeighborEvaluator
public RankingNeighborEvaluator(Classifier classifier)
- Parameters:
classifier
- The Classifier used to assign a score to a Neighbor
.
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.
evaluate
public double[] evaluate(Neighbor[] neighbors)
- Specified by:
evaluate
in interface NeighborEvaluator
- Overrides:
evaluate
in class ClassifyingNeighborEvaluator
- Parameters:
neighbors
-
- Returns:
- An array containing a score for each of the elements of
neighbors
.
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