Package org.tribuo

Class Excuse<T extends Output<T>>

java.lang.Object
org.tribuo.Excuse<T>
Direct Known Subclasses:
EnsembleExcuse

public class Excuse<T extends Output<T>> extends Object
Holds an Example, a Prediction and a Map from String to List of Pairs that contains the per output explanation.
  • Constructor Details

    • Excuse

      public Excuse(Example<T> example, Prediction<T> prediction, Map<String,List<com.oracle.labs.mlrg.olcut.util.Pair<String,Double>>> weights)
      Constructs an excuse for the prediction of the supplied example, using the feature weights.
      Parameters:
      example - The example to excuse.
      prediction - The prediction to excuse.
      weights - The feature weights involved.
  • Method Details

    • excuse

      public List<com.oracle.labs.mlrg.olcut.util.Pair<String,Double>> excuse(String label)
      Returns the features involved in this excuse.
      Parameters:
      label - The features for the requested output.
      Returns:
      The features invovled.
    • getPrediction

      public Prediction<T> getPrediction()
      Returns the prediction being excused.
      Returns:
      The prediction.
    • getScores

      public Map<String,List<com.oracle.labs.mlrg.olcut.util.Pair<String,Double>>> getScores()
      Returns the scores for all outputs and the relevant feature values.
      Returns:
      The output scores and feature values.
    • getExample

      public Example<T> getExample()
      The example being excused.
      Returns:
      The example.