Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## cc.mallet.cluster.neighbor_evaluator
Class PairwiseEvaluator

    java.lang.Object
      cc.mallet.cluster.neighbor_evaluator.ClassifyingNeighborEvaluator
          cc.mallet.cluster.neighbor_evaluator.PairwiseEvaluator

All Implemented Interfaces:
  NeighborEvaluator, java.io.Serializable

    public class PairwiseEvaluator

extends ClassifyingNeighborEvaluator

Uses a `Classifier` over pairs of `Instances` to score `Neighbor`. Currently only supports `AgglomerativeNeighbor`s.

Since:
  1.0
Version:
  1.0
Author:
  "Aron Culotta"
See Also:
  `ClassifyingNeighborEvaluator`, Serialized Form

Nested Class Summary
`static class` | `PairwiseEvaluator.Average`
`static interface` | `PairwiseEvaluator.CombiningStrategy` Specifies how to combine a set of pairwise scores into a cluster-wise score.
`static class` | `PairwiseEvaluator.Maximum`
`static class` | `PairwiseEvaluator.Minimum`

Constructor Summary
`PairwiseEvaluator(Classifier classifier, java.lang.String scoringLabel, PairwiseEvaluator.CombiningStrategy combiningStrategy, boolean mergeFirst)`

Method Summary
`double` | `evaluate(Neighbor neighbor)`
`double[]` | `evaluate(Neighbor[] neighbors)`
`void` | `reset()` Reset the state of the evaluator.
`java.lang.String` | `toString()`

Methods inherited from class cc.mallet.cluster.neighbor_evaluator.ClassifyingNeighborEvaluator
`getClassifier`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### PairwiseEvaluator

    public PairwiseEvaluator(Classifier classifier,
                             java.lang.String scoringLabel,
                             PairwiseEvaluator.CombiningStrategy combiningStrategy,
                             boolean mergeFirst)

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.

Method Detail

### 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`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD