Package | Description |
---|---|
org.tribuo.classification.sequence |
Provides infrastructure for
SequenceModel s which
emit Label s at each step of the sequence. |
org.tribuo.classification.sequence.example |
Provides a classification sequence data generator for smoke testing implementations.
|
org.tribuo.classification.sequence.viterbi |
Provides an implementation of Viterbi for generating structured outputs, which can sit on top of any
Label based classification model. |
org.tribuo.classification.sgd.crf |
Provides an implementation of a linear chain CRF trained using Stochastic Gradient Descent.
|
org.tribuo.interop.tensorflow.sequence |
Provides an interface for working with Tensorflow sequence models, using Tribuo's
SequenceModel abstraction. |
org.tribuo.sequence |
Provides core classes for working with sequences of
Example s. |
Modifier and Type | Method and Description |
---|---|
abstract <SUB extends ConfidencePredictingSequenceModel.Subsequence> |
ConfidencePredictingSequenceModel.scoreSubsequences(SequenceExample<Label> example,
List<Prediction<Label>> predictions,
List<SUB> subsequences)
The scoring function for the subsequences.
|
Modifier and Type | Method and Description |
---|---|
static SequenceExample<Label> |
SequenceDataGenerator.generateEmptyExample()
This generates a sequence example with no examples.
|
static SequenceExample<Label> |
SequenceDataGenerator.generateGorillaA() |
static SequenceExample<Label> |
SequenceDataGenerator.generateGorillaB() |
static SequenceExample<Label> |
SequenceDataGenerator.generateInvalidExample()
This generates a sequence example with features that are unused by the training data.
|
static SequenceExample<Label> |
SequenceDataGenerator.generateOtherInvalidExample()
This generates a sequence example where the first example has no features.
|
Modifier and Type | Method and Description |
---|---|
List<Prediction<Label>> |
ViterbiModel.predict(SequenceExample<Label> examples) |
Modifier and Type | Method and Description |
---|---|
static com.oracle.labs.mlrg.olcut.util.Pair<int[],SparseVector[]> |
CRFModel.convert(SequenceExample<Label> example,
ImmutableFeatureMap featureIDMap,
ImmutableOutputInfo<Label> labelIDMap)
Converts a
SequenceExample into an array of SparseVector s and labels suitable for CRF prediction. |
static <T extends Output<T>> |
CRFModel.convert(SequenceExample<T> example,
ImmutableFeatureMap featureIDMap)
Converts a
SequenceExample into an array of SparseVector s suitable for CRF prediction. |
List<Prediction<Label>> |
CRFModel.predict(SequenceExample<Label> example) |
List<Double> |
CRFModel.scoreChunks(SequenceExample<Label> example,
List<Chunk> chunks)
Scores the chunks using constrained belief propagation.
|
<SUB extends ConfidencePredictingSequenceModel.Subsequence> |
CRFModel.scoreSubsequences(SequenceExample<Label> example,
List<Prediction<Label>> predictions,
List<SUB> subsequences) |
Modifier and Type | Method and Description |
---|---|
List<Prediction<T>> |
SequenceOutputTransformer.decode(org.tensorflow.Tensor<?> output,
SequenceExample<T> input,
ImmutableOutputInfo<T> labelMap)
Decode a tensor of graph output into a list of predictions for the input sequence.
|
Map<String,org.tensorflow.Tensor<?>> |
SequenceExampleTransformer.encode(SequenceExample<T> example,
ImmutableFeatureMap featureMap)
Encodes an example as a feed dict.
|
Map<String,org.tensorflow.Tensor<?>> |
SequenceOutputTransformer.encode(SequenceExample<T> example,
ImmutableOutputInfo<T> labelMap)
Encodes an example's label as a feed dict.
|
List<Prediction<T>> |
TensorflowSequenceModel.predict(SequenceExample<T> example) |
Modifier and Type | Method and Description |
---|---|
List<List<Prediction<T>>> |
SequenceOutputTransformer.decode(org.tensorflow.Tensor<?> outputs,
List<SequenceExample<T>> inputBatch,
ImmutableOutputInfo<T> labelMap)
Decode graph output tensors corresponding to a batch of input sequences.
|
Map<String,org.tensorflow.Tensor<?>> |
SequenceExampleTransformer.encode(List<SequenceExample<T>> batch,
ImmutableFeatureMap featureMap)
Encodes a batch of examples as a feed dict.
|
Map<String,org.tensorflow.Tensor<?>> |
SequenceOutputTransformer.encode(List<SequenceExample<T>> batch,
ImmutableOutputInfo<T> labelMap)
Encodes a batch of labels as a feed dict.
|
Modifier and Type | Field and Description |
---|---|
protected List<SequenceExample<T>> |
SequenceDataset.data
The data in this data set.
|
Modifier and Type | Method and Description |
---|---|
SequenceExample<T> |
SequenceExample.copy()
Returns a deep copy of this SequenceExample.
|
static <T extends Output<T>> |
SequenceExample.createWithEmptyOutputs(List<? extends List<? extends Feature>> features,
OutputFactory<T> outputFactory)
Creates a SequenceExample using
OutputFactory.getUnknownOutput() as the output for each
sequence element. |
SequenceExample<T> |
SequenceDataset.getExample(int index)
Gets the example at the specified index, or throws IllegalArgumentException if
the index is out of bounds.
|
Modifier and Type | Method and Description |
---|---|
List<SequenceExample<T>> |
SequenceDataset.getData()
Returns an unmodifiable view on the data.
|
Iterator<SequenceExample<T>> |
SequenceDataset.iterator() |
Modifier and Type | Method and Description |
---|---|
void |
MutableSequenceDataset.add(SequenceExample<T> ex)
Adds a
SequenceExample to this dataset. |
protected void |
ImmutableSequenceDataset.add(SequenceExample<T> ex)
Adds a
SequenceExample to the dataset, which will insert feature ids, remove unknown features
and sort the examples by the feature ids. |
protected void |
ImmutableSequenceDataset.add(SequenceExample<T> ex,
Merger merger)
Adds a
SequenceExample to the dataset, which will insert feature ids, remove unknown features
and sort the examples by the feature ids. |
abstract List<Prediction<T>> |
SequenceModel.predict(SequenceExample<T> example)
Uses the model to predict the output for a single example.
|
Modifier and Type | Method and Description |
---|---|
void |
MutableSequenceDataset.addAll(Collection<SequenceExample<T>> collection)
Adds all the SequenceExamples in the supplied collection to this dataset.
|
List<List<Prediction<T>>> |
SequenceModel.predict(Iterable<SequenceExample<T>> examples)
Uses the model to predict the output for multiple examples.
|
Constructor and Description |
---|
SequenceExample(SequenceExample<T> other)
Creates a deep copy of the supplied sequence example.
|
Constructor and Description |
---|
ImmutableSequenceDataset(Iterable<SequenceExample<T>> dataSource,
DataProvenance sourceProvenance,
FeatureMap featureIDMap,
OutputInfo<T> outputIDInfo,
OutputFactory<T> outputFactory)
Creates a dataset from a data source.
|
ImmutableSequenceDataset(Iterable<SequenceExample<T>> dataSource,
DataProvenance sourceProvenance,
ImmutableFeatureMap featureIDMap,
ImmutableOutputInfo<T> outputIDInfo,
OutputFactory<T> outputFactory)
Creates a dataset from a data source.
|
MutableSequenceDataset(Iterable<SequenceExample<T>> dataSource,
DataProvenance sourceProvenance,
OutputFactory<T> outputFactory)
Creates a dataset from a data source.
|
Copyright © 2015–2021 Oracle and/or its affiliates. All rights reserved.