Class RankMaxEnt

  • All Implemented Interfaces:
    AlphabetCarrying, java.io.Serializable

    public class RankMaxEnt
    extends MaxEnt
    Rank Maximum Entropy classifier. This classifier chooses among a set of Instances with binary labels. Expects Instance data to be a FeatureVectorSequence, and the target to be a String representation of the index of the true best FeatureVectorSequence. Note that the Instance target may be a Labels to indicate a tie for the best Instance.
    Author:
    Aron Culotta culotta@cs.umass.edu
    See Also:
    Serialized Form
    • Constructor Detail

      • RankMaxEnt

        public RankMaxEnt​(Pipe dataPipe,
                          double[] parameters,
                          FeatureSelection featureSelection)
      • RankMaxEnt

        public RankMaxEnt​(Pipe dataPipe,
                          double[] parameters,
                          FeatureSelection[] perClassFeatureSelection)
      • RankMaxEnt

        public RankMaxEnt​(Pipe dataPipe,
                          double[] parameters)
    • Method Detail

      • getUnnormalizedClassificationScores

        public void getUnnormalizedClassificationScores​(Instance instance,
                                                        double[] scores)
        returns unnormalized scores, corresponding to the score an element of the InstanceList being the "top" instance
        Overrides:
        getUnnormalizedClassificationScores in class MaxEnt
        Parameters:
        instance - instance with data field a InstanceList.
        scores - has length = number of Instances in Instance.data, which is of type InstanceList
      • getClassificationScoresForTies

        public void getClassificationScoresForTies​(Instance instance,
                                                   double[] scores,
                                                   int[] bestLabels)
        Used by RankMaxEntTrainer to calculate the value when the labeling contains ties. Does not include scores of tied elements in normalization.
        Parameters:
        instance -
        scores -
        bestLabels - Indices of Instances ties for 1st place.
      • print

        public void print()
        Description copied from class: Classifier
        Outputs human-readable description of classifier (e.g., list of weights, decision tree) to System.out
        Overrides:
        print in class MaxEnt