public class MutualInformationFeatureSelectionExtractor<OUTCOME_T,FOCUS_T extends Annotation> extends FeatureSelectionExtractor<OUTCOME_T> implements FeatureExtractor1<FOCUS_T>
Selects features via mutual information statistics between the features extracted from its sub-extractor and the outcome values they are paired with in classification instances.
| Modifier and Type | Class and Description |
|---|---|
static class |
MutualInformationFeatureSelectionExtractor.CombineScoreMethod
Specifies how scores for each outcome should be combined/aggregated into a single score
|
static class |
MutualInformationFeatureSelectionExtractor.MutualInformationStats<OUTCOME_T>
Helper class for aggregating and computing mutual information statistics
|
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
isTrained |
name| Constructor and Description |
|---|
MutualInformationFeatureSelectionExtractor(String name,
FeatureExtractor1<FOCUS_T> extractor) |
MutualInformationFeatureSelectionExtractor(String name,
FeatureExtractor1<FOCUS_T> extractor,
int numFeatures) |
MutualInformationFeatureSelectionExtractor(String name,
FeatureExtractor1<FOCUS_T> extractor,
MutualInformationFeatureSelectionExtractor.CombineScoreMethod combineMeasureType,
double smoothingCount,
int numFeatures) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
apply(Feature feature) |
List<Feature> |
extract(JCas view,
FOCUS_T focusAnnotation)
Some feature extractors will require some specific number of annotations that is greater than
one.
|
List<String> |
getSelectedFeatures() |
void |
load(URI uri)
Loads statistics from location URI
|
String |
nameFeature(Feature feature) |
void |
save(URI uri)
Saves statistics from train in location URI
|
void |
train(Iterable<Instance<OUTCOME_T>> instances)
In the prototypical case, train takes a collection of instances and computes statistics over
the values such as computing mean, standard deviation, TF*IDF, etc...
|
transformisTransformable, selectTransformableFeaturesprotected boolean isTrained
public MutualInformationFeatureSelectionExtractor(String name, FeatureExtractor1<FOCUS_T> extractor)
public MutualInformationFeatureSelectionExtractor(String name, FeatureExtractor1<FOCUS_T> extractor, int numFeatures)
public MutualInformationFeatureSelectionExtractor(String name, FeatureExtractor1<FOCUS_T> extractor, MutualInformationFeatureSelectionExtractor.CombineScoreMethod combineMeasureType, double smoothingCount, int numFeatures)
public List<Feature> extract(JCas view, FOCUS_T focusAnnotation) throws CleartkExtractorException
FeatureExtractor1extract in interface FeatureExtractor1<FOCUS_T extends Annotation>view - the current view of the document.focusAnnotation - the annotation for which to collect features.CleartkExtractorExceptionpublic final List<String> getSelectedFeatures()
public void load(URI uri) throws IOException
TrainableExtractorload in interface TrainableExtractor<OUTCOME_T>IOExceptionpublic String nameFeature(Feature feature)
public void save(URI uri) throws IOException
TrainableExtractorsave in interface TrainableExtractor<OUTCOME_T>IOExceptionpublic void train(Iterable<Instance<OUTCOME_T>> instances)
TrainableExtractortrain in interface TrainableExtractor<OUTCOME_T>instances - - URI pointing to the output location for saving statisticsCopyright © 2014. All rights reserved.