public interface TrainableExtractor<OUTCOME_T>
TrainableExtractors defines a extractors that can be trained to fix up data based on a set of instances. Prototypical cases include computing statistics for normalization such as mean, standard deviation, min, max, or for computing corpus tf*idf values
TrainableExtractors that have not yet been trained cannot be used as subextractors inside of any other feature extractor, though they can have subextractors of their own. So for example, while the following will work:
new TfidfExtractor(new ContextExtractor
the following will not:
new ContextExtractor
| Modifier and Type | Method and Description |
|---|---|
void |
load(URI uri)
Loads statistics from location URI
|
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...
|
Instance<OUTCOME_T> |
transform(Instance<OUTCOME_T> instance)
Transforms all features handled by this extractor.
|
void load(URI uri) throws IOException
IOExceptionvoid save(URI uri) throws IOException
IOExceptionvoid train(Iterable<Instance<OUTCOME_T>> instances)
instances - - URI pointing to the output location for saving statisticsInstance<OUTCOME_T> transform(Instance<OUTCOME_T> instance)
train(Iterable) was called, to complete the processing of the Instance.instance - An instance that was created before train(Iterable) was called.Copyright © 2014. All rights reserved.