Uses of Class
org.tribuo.sequence.SequenceModel
Package
Description
Evaluation classes for multi-class classification.
Provides infrastructure for
SequenceModel
s which
emit Label
s at each step of the sequence.Provides an implementation of Viterbi for generating structured outputs, which can sit on top of any
Label
based classification model.Provides an implementation of a linear chain CRF trained using Stochastic Gradient Descent.
This package contains the infrastructure classes for building evaluation metrics.
Provides an interface for working with TensorFlow sequence models, using Tribuo's
SequenceModel
abstraction.Provides core classes for working with sequences of
Example
s.-
Uses of SequenceModel in org.tribuo.classification.evaluation
ModifierConstructorDescriptionContext
(SequenceModel<Label> model, List<Prediction<Label>> predictions) Constructs a context and compute the confusion matrix using the specified model and predictions. -
Uses of SequenceModel in org.tribuo.classification.sequence
Modifier and TypeClassDescriptionclass
A Sequence model which can provide confidence predictions for subsequence predictions.Modifier and TypeMethodDescriptionprotected LabelMetric.Context
LabelSequenceEvaluator.createContext
(SequenceModel<Label> model, List<List<Prediction<Label>>> predictions) protected Set<LabelMetric>
LabelSequenceEvaluator.createMetrics
(SequenceModel<Label> model) -
Uses of SequenceModel in org.tribuo.classification.sequence.viterbi
Modifier and TypeMethodDescriptionViterbiTrainer.train
(SequenceDataset<Label> dataset, Map<String, com.oracle.labs.mlrg.olcut.provenance.Provenance> runProvenance) The viterbi train method is unique because it delegates to a regularModel
train method, but before it does, it adds features derived from preceding labels. -
Uses of SequenceModel in org.tribuo.classification.sgd.crf
Modifier and TypeClassDescriptionclass
An inference time model for a linear chain CRF trained using SGD. -
Uses of SequenceModel in org.tribuo.evaluation.metrics
Modifier and TypeMethodDescriptionMetricContext.getSequenceModel()
Gets the SequenceModel used by this context.ModifierConstructorDescriptionprotected
MetricContext
(SequenceModel<T> model, List<Prediction<T>> predictions) Constructs a metric context for a sequence model. -
Uses of SequenceModel in org.tribuo.interop.tensorflow.sequence
Modifier and TypeClassDescriptionclass
TensorFlowSequenceModel<T extends Output<T>>
A TensorFlow model which implements SequenceModel, suitable for use in sequential prediction tasks.Modifier and TypeMethodDescriptionTensorFlowSequenceTrainer.train
(SequenceDataset<T> examples, Map<String, com.oracle.labs.mlrg.olcut.provenance.Provenance> runProvenance) -
Uses of SequenceModel in org.tribuo.sequence
Modifier and TypeClassDescriptionclass
IndependentSequenceModel<T extends Output<T>>
A SequenceModel which independently predicts each element of the sequence.Modifier and TypeMethodDescription<U extends Output<U>>
SequenceModel<U>Casts the model to the specified output type, assuming it is valid.static SequenceModel<?>
SequenceModel.deserialize
(org.tribuo.protos.core.SequenceModelProto proto) Deserializes the model from the supplied protobuf.static SequenceModel<?>
SequenceModel.deserializeFromFile
(Path path) Reads an instance ofSequenceModelProto
from the supplied path and deserializes it.static SequenceModel<?>
SequenceModel.deserializeFromStream
(InputStream is) Reads an instance ofSequenceModelProto
from the supplied input stream and deserializes it.HashingSequenceTrainer.train
(SequenceDataset<T> sequenceExamples, Map<String, com.oracle.labs.mlrg.olcut.provenance.Provenance> instanceProvenance) This clones theSequenceDataset
, hashes each of the examples and rewrites their feature ids before passing it to the inner trainer.default SequenceModel<T>
SequenceTrainer.train
(SequenceDataset<T> examples) Trains a sequence prediction model using the examples in the given data set.SequenceTrainer.train
(SequenceDataset<T> examples, Map<String, com.oracle.labs.mlrg.olcut.provenance.Provenance> runProvenance) Trains a sequence prediction model using the examples in the given data set.Modifier and TypeMethodDescriptionprotected abstract C
AbstractSequenceEvaluator.createContext
(SequenceModel<T> model, List<List<Prediction<T>>> predictions) Create the context needed for evaluation.AbstractSequenceEvaluator.createMetrics
(SequenceModel<T> model) Creates the appropriate set of metrics for this model, by querying for it'sOutputInfo
.final E
AbstractSequenceEvaluator.evaluate
(SequenceModel<T> model, List<List<Prediction<T>>> predictions, DataProvenance dataProvenance) Produces an evaluation for the supplied model and predictions by aggregating the appropriate statistics.final E
AbstractSequenceEvaluator.evaluate
(SequenceModel<T> model, SequenceDataset<T> dataset) Produces an evaluation for the supplied model and dataset, by callingpredict(org.tribuo.sequence.SequenceExample<T>)
to create the predictions, then aggregating the appropriate statistics.final E
AbstractSequenceEvaluator.evaluate
(SequenceModel<T> model, SequenceDataSource<T> datasource) Produces an evaluation for the supplied model and datasource, by callingpredict(org.tribuo.sequence.SequenceExample<T>)
to create the predictions, then aggregating the appropriate statistics.SequenceEvaluator.evaluate
(SequenceModel<T> model, List<List<Prediction<T>>> predictions, DataProvenance dataProvenance) Evaluates the supplied model and predictions by aggregating the appropriate statistics.SequenceEvaluator.evaluate
(SequenceModel<T> model, SequenceDataset<T> dataset) Evaluates the dataset using the supplied model, returning an immutable evaluation.SequenceEvaluator.evaluate
(SequenceModel<T> model, SequenceDataSource<T> datasource) Evaluates the datasource using the supplied model, returning an immutable evaluation.ModifierConstructorDescriptionImmutableSequenceDataset
(SequenceDataSource<T> dataSource, SequenceModel<T> model) Creates a dataset from a data source, taking the output and feature domains from the supplied model.