public class ViterbiModel extends SequenceModel<Label>
Modifier and Type | Class and Description |
---|---|
static class |
ViterbiModel.ScoreAggregation
Types of label score aggregation.
|
featureIDMap, name, outputIDMap, provenanceOutput
Modifier and Type | Method and Description |
---|---|
ViterbiModel.ScoreAggregation |
getScoreAggregation() |
int |
getStackSize() |
Map<String,List<com.oracle.labs.mlrg.olcut.util.Pair<String,Double>>> |
getTopFeatures(int n)
Gets the top
n features associated with this model. |
protected List<Label> |
getTopLabels(Map<String,Label> distribution) |
protected static List<Label> |
getTopLabels(Map<String,Label> distribution,
int stackSize) |
List<List<Prediction<Label>>> |
predict(SequenceDataset<Label> examples)
Uses the model to predict the labels for multiple examples contained in
a data set.
|
List<Prediction<Label>> |
predict(SequenceExample<Label> examples)
Uses the model to predict the output for a single example.
|
getFeatureIDMap, getName, getOutputIDInfo, getProvenance, predict, setName, toMaxLabels, toString, validate
public List<List<Prediction<Label>>> predict(SequenceDataset<Label> examples)
SequenceModel
predict
in class SequenceModel<Label>
examples
- the data set containing the examples to predict.public List<Prediction<Label>> predict(SequenceExample<Label> examples)
SequenceModel
predict
in class SequenceModel<Label>
examples
- the example to predict.protected static List<Label> getTopLabels(Map<String,Label> distribution, int stackSize)
public int getStackSize()
public ViterbiModel.ScoreAggregation getScoreAggregation()
public Map<String,List<com.oracle.labs.mlrg.olcut.util.Pair<String,Double>>> getTopFeatures(int n)
SequenceModel
n
features associated with this model.
If the model does not produce per output feature lists, it returns a map with a single element with key Model.ALL_OUTPUTS.
If the model cannot describe it's top features then it returns Collections.emptyMap()
.
getTopFeatures
in class SequenceModel<Label>
n
- the number of features to return. If this value is less than 0,
all features should be returned for each class, unless the model cannot score it's features.Copyright © 2015–2021 Oracle and/or its affiliates. All rights reserved.