Class IndependentSequenceModel<T extends Output<T>>

Type Parameters:
T - The output type.
All Implemented Interfaces:<ModelProvenance>, Serializable

public class IndependentSequenceModel<T extends Output<T>> extends SequenceModel<T>
A SequenceModel which independently predicts each element of the sequence.
See Also:
  • Method Details

    • predict

      public List<Prediction<T>> predict(SequenceExample<T> example)
      Description copied from class: SequenceModel
      Uses the model to predict the output for a single example.
      Specified by:
      predict in class SequenceModel<T extends Output<T>>
      example - the example to predict.
      the result of the prediction.
    • getTopFeatures

      public Map<String,List<<String,Double>>> getTopFeatures(int n)
      Description copied from class: SequenceModel
      Gets the top 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().

      Specified by:
      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.
      a map from string outputs to an ordered list of pairs of feature names and weights associated with that feature in the model