T
- The output type.public class IndependentSequenceModel<T extends Output<T>> extends SequenceModel<T>
featureIDMap, name, outputIDMap, provenanceOutput
Modifier and Type | Method and Description |
---|---|
Map<String,List<com.oracle.labs.mlrg.olcut.util.Pair<String,Double>>> |
getTopFeatures(int n)
Gets the top
n features associated with this model. |
List<Prediction<T>> |
predict(SequenceExample<T> example)
Uses the model to predict the output for a single example.
|
getFeatureIDMap, getName, getOutputIDInfo, getProvenance, predict, predict, setName, toMaxLabels, toString, validate
public List<Prediction<T>> predict(SequenceExample<T> example)
SequenceModel
predict
in class SequenceModel<T extends Output<T>>
example
- the example to predict.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<T extends Output<T>>
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.