AnnotatingInference adds the ability to take a Marginal and attach (or replace) new information to the Datum.
AugmentableInference is an epic.framework.Inference that can support injecting additional information into the structure computation.
A model that has some kind of evaluation function.
A model that has some kind of evaluation function. Used with an epic.framework.AnnotatingInference, you can make predictions for a test set and then get the performance.
Marker for the output of an evaluation routine.
Marker for the output of an evaluation routine.
self type
Just a marker for features.
Inference is the core interface in Epic.
Inference is the core interface in Epic. It produces instances of epic.framework.Marginal which are then turned into epic.framework.ExpectedCounts.
There are two kinds of marginals produced by an inference object: gold and guess. Gold marginals are the marginals conditioned on the output label/structure itself (e.g. the parse tree). Guess marginals are the marginals conditioned on only the input data (e.g. the words in the sentence)
In structured prediction, the objective usually takes the form: \minimize \sum_{all structures} score(structure) - \sum_{all structures compatible with output label} score(structure)
with the derivative being: E_{all structures} features(structure) - E_{all structures compatible with output label} features(structure)
replacing sum with max for max marginals.
the kind of thing to do inference on
Something that has a label.
A class that returns an augment that gives higher scores to spans that are wrong.
A class that returns an augment that gives higher scores to spans that are wrong. Used for training mostly.
Marginals are created by epic.framework.Inference objects and used for expected counts and decoding, where applicable.
Marginals are created by epic.framework.Inference objects and used for expected counts and decoding, where applicable. Max Marginals (i.e. a one best list) are totally fine if you want to do max-margin work.
They only have one method: logPartition. Most of the work is done with Inference objects directly.
A Model represents a class for turning weight vectors into epic.framework.Inferences.
A Model represents a class for turning weight vectors into epic.framework.Inferences. It's main job is to hook up with a epic.framework.ModelObjective and mediate computation of ExpectedCounts and conversion to the objective that's needed for optimization.
the kind of
Interface for producing Models from training data.
The objective function for training a epic.framework.Model.
The objective function for training a epic.framework.Model. Selects a batch, creates an epic.framework.Inference object using the model, computes expected counts using the inference, and then turns them into the objective value.
TODO
A ProjectableInference is an epic.framework.AugmentableInference that can also create a new Augment from the marginal and the old augment.
A ProjectableInference is an epic.framework.AugmentableInference that can also create a new Augment from the marginal and the old augment. This is mostly for EP/BP-type setups where you iteratively improve the prior until convergence.
the kind of thing to do inference on
the extra piece of information we can use to do inference
This is a standard expected counts class that most models will use...
This is a standard expected counts class that most models will use... Loss is the log-loss (or, whatever), and counts are for the derivative
TODO
AugmentableInference is an epic.framework.Inference that can support injecting additional information into the structure computation. This can include prior information over the structure (useful for EP or other Bayesian inference) or loss-augmentation.
the kind of thing to do inference on
the extra piece of information we can use to do inference