Class DefaultFeatureExtractor
java.lang.Object
org.tribuo.classification.sequence.viterbi.DefaultFeatureExtractor
- All Implemented Interfaces:
com.oracle.labs.mlrg.olcut.config.Configurable,com.oracle.labs.mlrg.olcut.provenance.Provenancable<com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance>,Serializable,LabelFeatureExtractor
A label feature extractor that produces several kinds of label-based features.
The options are: the most recent output, the least recent output, recent bigrams, recent trigrams, recent 4-grams.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultFeatureExtractor(int mostRecentOutcome, int leastRecentOutcome, boolean useBigram, boolean useTrigram, boolean use4gram) -
Method Summary
Modifier and TypeMethodDescriptionextractFeatures(List<Label> previousOutcomes, double value) Generates features based on the previously produced labels.com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenancetoString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.oracle.labs.mlrg.olcut.config.Configurable
postConfig
-
Constructor Details
-
DefaultFeatureExtractor
public DefaultFeatureExtractor() -
DefaultFeatureExtractor
public DefaultFeatureExtractor(int mostRecentOutcome, int leastRecentOutcome, boolean useBigram, boolean useTrigram, boolean use4gram)
-
-
Method Details
-
toString
-
extractFeatures
Description copied from interface:LabelFeatureExtractorGenerates features based on the previously produced labels.- Specified by:
extractFeaturesin interfaceLabelFeatureExtractor- Parameters:
previousOutcomes- The previous step's labels.value- The value to give to the features.- Returns:
- Features.
-
getProvenance
- Specified by:
getProvenancein interfacecom.oracle.labs.mlrg.olcut.provenance.Provenancable<com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance>
-