com.aliasi.dca
Class DiscreteObjectChooser<E>

java.lang.Object
  extended by com.aliasi.dca.DiscreteObjectChooser<E>
All Implemented Interfaces:
Serializable

public class DiscreteObjectChooser<E>
extends Object
implements Serializable

A DiscreteObjectChooser provides an implementation of discrete choice analysis (DCA) over arbitrary objects using a feature extractor.

The feature extractor is used to map objects to feature maps, and a feature symbol table is used to convert these feature maps into vectors which may be fed into the contained discrete chooser.

Estimation

Estimation is carried out the same way as for basic choosers, with the intermediate step of feature extraction over the basic corpus of object choices.

Serialization

A discrete object chooser may be serialized if its feature extractor and feature symbol table are serializable.

Discrete object choosers created by estimation are serializable.

Since:
LingPipe3.9.1
Version:
3.9.1
Author:
Bob Carpenter
See Also:
Serialized Form

Constructor Summary
DiscreteObjectChooser(FeatureExtractor<E> featureExtractor, SymbolTable featureSymbolTable, DiscreteChooser chooser)
          Construct a discrete chooser based on the specified feature extractor, feature symbol table, and base chooser.
 
Method Summary
 DiscreteChooser chooser()
          Returns the discrete chooser on which this object chooser is based.
static
<F> DiscreteObjectChooser<F>
estimate(FeatureExtractor<F> featureExtractor, List<List<F>> alternativeObjectss, int[] choices, int minFeatureCount, RegressionPrior prior, int priorBlockSize, AnnealingSchedule annealingSchedule, double minImprovement, int minEpochs, int maxEpochs, Reporter reporter)
          Because intercepts are ignored, they are not added to feature maps and should not be treated as noninformative in the prior.
 FeatureExtractor<E> featureExtractor()
          Return the feature extractor for this chooser.
 SymbolTable featureSymbolTable()
          Returns an unmodifiable view of the feature symbol table underlying this chooser.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DiscreteObjectChooser

public DiscreteObjectChooser(FeatureExtractor<E> featureExtractor,
                             SymbolTable featureSymbolTable,
                             DiscreteChooser chooser)
Construct a discrete chooser based on the specified feature extractor, feature symbol table, and base chooser.

Method Detail

featureExtractor

public FeatureExtractor<E> featureExtractor()
Return the feature extractor for this chooser.

Returns:
This chooser's feature extractor.

featureSymbolTable

public SymbolTable featureSymbolTable()
Returns an unmodifiable view of the feature symbol table underlying this chooser.

Returns:
The feature symbol table for this chooser.

chooser

public DiscreteChooser chooser()
Returns the discrete chooser on which this object chooser is based.


estimate

public static <F> DiscreteObjectChooser<F> estimate(FeatureExtractor<F> featureExtractor,
                                                    List<List<F>> alternativeObjectss,
                                                    int[] choices,
                                                    int minFeatureCount,
                                                    RegressionPrior prior,
                                                    int priorBlockSize,
                                                    AnnealingSchedule annealingSchedule,
                                                    double minImprovement,
                                                    int minEpochs,
                                                    int maxEpochs,
                                                    Reporter reporter)

Because intercepts are ignored, they are not added to feature maps and should not be treated as noninformative in the prior.