edu.illinois.cs.cogcomp.lbj.coref.scorers
Class BCubedUniformPerMentionBase

java.lang.Object
  extended by edu.illinois.cs.cogcomp.lbj.coref.scorers.Scorer<ChainSolution<T>>
      extended by edu.illinois.cs.cogcomp.lbj.coref.scorers.ChainScorer<Mention>
          extended by edu.illinois.cs.cogcomp.lbj.coref.scorers.BCubedBase
              extended by edu.illinois.cs.cogcomp.lbj.coref.scorers.BCubedUniformPerMentionBase
Direct Known Subclasses:
BCubedScorer

public abstract class BCubedUniformPerMentionBase
extends BCubedBase

Base class for scorers that compute the B-Cubed F-Score for a collection of documents, giving equal weight to each mention. See (Amit) Bagga and Baldwin (MUC-7 1998).

Author:
Eric Bengtson

Constructor Summary
protected BCubedUniformPerMentionBase()
          Default constructor.
 
Method Summary
abstract  double getPrecision(java.util.List<ChainSolution<Mention>> keys, java.util.List<ChainSolution<Mention>> preds)
          Computes the B-Cubed precision for a collection of documents.
abstract  double getRecall(java.util.List<ChainSolution<Mention>> keys, java.util.List<ChainSolution<Mention>> preds)
          Computes the B-Cubed recall for a collection of documents.
abstract  Score getScore(java.util.List<ChainSolution<Mention>> keys, java.util.List<ChainSolution<Mention>> preds)
          Computes the B-Cubed F-Score for a collection of documents.
 
Methods inherited from class edu.illinois.cs.cogcomp.lbj.coref.scorers.BCubedBase
getPartition, getPrecision, getRecall, getScore, haveSameMembers
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BCubedUniformPerMentionBase

protected BCubedUniformPerMentionBase()
Default constructor.

Method Detail

getScore

public abstract Score getScore(java.util.List<ChainSolution<Mention>> keys,
                               java.util.List<ChainSolution<Mention>> preds)
Computes the B-Cubed F-Score for a collection of documents.

The precision of a collection of documents is the average of the precisions of all mentions in all documents. The precision of a mention m is calculated as the number of mentions correctly predicted to be in the same cluster as m (including m) divided by the number of mentions in the predicted cluster containing m.

The recall of a collection of documents is the average of the recalls of all mentions in all documents. The recall of a mention m is calculated as the number of mentions correctly predicted to be in the same cluster as m (including m) divided by the number of mentions in the true cluster containing m.

The B-Cubed F-Score is the harmonic mean of the precision and recall defined above. This B-Cubed F-Score is weighted so that every mention's precision and recall gets equal weight.

Specified by:
getScore in class BCubedBase
Parameters:
keys - A collection of true (gold standard) solutions (for example, one per document)
preds - A collection of predicted solutions (for example, one per document)
Returns:
The B-Cubed F-Score.

getPrecision

public abstract double getPrecision(java.util.List<ChainSolution<Mention>> keys,
                                    java.util.List<ChainSolution<Mention>> preds)
Computes the B-Cubed precision for a collection of documents.

Specified by:
getPrecision in class BCubedBase
Parameters:
keys - A collection of true (gold standard) solutions (for example, one per document)
preds - A collection of predicted solutions (for example, one per document)
Returns:
The B-Cubed precision.

getRecall

public abstract double getRecall(java.util.List<ChainSolution<Mention>> keys,
                                 java.util.List<ChainSolution<Mention>> preds)
Computes the B-Cubed recall for a collection of documents.

Specified by:
getRecall in class BCubedBase
Parameters:
keys - A collection of true (gold standard) solutions (for example, one per document)
preds - A collection of predicted solutions (for example, one per document)
Returns:
The B-Cubed recall.