OBJECT - Type of object being annotatedANNOTATION - Type of annotationFEATURE - Type of feature extracted by the extractorpublic class ModelAnnotator<OBJECT,ANNOTATION,FEATURE> extends BatchAnnotator<OBJECT,ANNOTATION>
BatchAnnotator backed by a EstimatableModel. This only really makes
sense if the dependent variable of the model can take a set of discrete
values.| Constructor and Description |
|---|
ModelAnnotator(FeatureExtractor<FEATURE,OBJECT> extractor,
EstimatableModel<FEATURE,ANNOTATION> model,
Set<ANNOTATION> annotations)
Construct with the given parameters.
|
| Modifier and Type | Method and Description |
|---|---|
List<ScoredAnnotation<ANNOTATION>> |
annotate(OBJECT object)
Generate annotations for the given object.
|
Set<ANNOTATION> |
getAnnotations() |
void |
train(List<? extends Annotated<OBJECT,ANNOTATION>> data)
Train the object with the given data.
|
trainclassifypublic ModelAnnotator(FeatureExtractor<FEATURE,OBJECT> extractor, EstimatableModel<FEATURE,ANNOTATION> model, Set<ANNOTATION> annotations)
extractor - The feature extractormodel - The modelannotations - The set of annotations that the model can producepublic void train(List<? extends Annotated<OBJECT,ANNOTATION>> data)
BatchTrainerBatchTrainers should reset the underlying
model everytime this method is called.data - the training datapublic Set<ANNOTATION> getAnnotations()
public List<ScoredAnnotation<ANNOTATION>> annotate(OBJECT object)
Annotatorobject - the image