Class LIMETextCLI

java.lang.Object
org.tribuo.classification.explanations.lime.LIMETextCLI
All Implemented Interfaces:
com.oracle.labs.mlrg.olcut.command.CommandGroup

public class LIMETextCLI extends Object implements com.oracle.labs.mlrg.olcut.command.CommandGroup
A CLI for interacting with LIMEText. Uses a simple tokenisation and text extraction pipeline.
  • Field Details

    • shell

      protected com.oracle.labs.mlrg.olcut.command.CommandInterpreter shell
  • Constructor Details

  • Method Details

    • getName

      public String getName()
      Specified by:
      getName in interface com.oracle.labs.mlrg.olcut.command.CommandGroup
    • getDescription

      Specified by:
      getDescription in interface com.oracle.labs.mlrg.olcut.command.CommandGroup
    • fileCompleter

      public org.jline.reader.Completer[] fileCompleter()
    • startShell

      public void startShell()
      Start the command shell
    • loadModel

      @Command(usage="<filename> - Load a model from disk.", completers="fileCompleter") public String loadModel(com.oracle.labs.mlrg.olcut.command.CommandInterpreter ci, File path)
    • generatesProbabilities

      @Command(usage="Does the model generate probabilities") public String generatesProbabilities(com.oracle.labs.mlrg.olcut.command.CommandInterpreter ci)
    • modelDescription

      @Command(usage="Shows the model description") public String modelDescription(com.oracle.labs.mlrg.olcut.command.CommandInterpreter ci)
    • featureInfo

      @Command(usage="Shows the information on a particular feature") public String featureInfo(com.oracle.labs.mlrg.olcut.command.CommandInterpreter ci, String featureName)
    • outputInfo

      @Command(usage="Shows the output information.") public String outputInfo(com.oracle.labs.mlrg.olcut.command.CommandInterpreter ci)
    • topFeatures

      @Command(usage="<int> - Shows the top N features in the model") public String topFeatures(com.oracle.labs.mlrg.olcut.command.CommandInterpreter ci, int numFeatures)
    • numFeatures

      @Command(usage="Shows the number of features in the model") public String numFeatures(com.oracle.labs.mlrg.olcut.command.CommandInterpreter ci)
    • minCount

      @Command(usage="<min count> - Shows the number of features that occurred more than min count times.") public String minCount(com.oracle.labs.mlrg.olcut.command.CommandInterpreter ci, int minCount)
    • showLabelStats

      @Command(usage="Shows the output statistics") public String showLabelStats(com.oracle.labs.mlrg.olcut.command.CommandInterpreter ci)
    • setNumSamples

      @Command(usage="Sets the number of samples to use in LIME") public String setNumSamples(com.oracle.labs.mlrg.olcut.command.CommandInterpreter ci, int newNumSamples)
    • explain

      @Command(usage="Explain a text classification") public String explain(com.oracle.labs.mlrg.olcut.command.CommandInterpreter ci, String[] tokens)
    • setNumFeatures

      @Command(usage="Sets the number of features LIME should use in an explanation") public String setNumFeatures(com.oracle.labs.mlrg.olcut.command.CommandInterpreter ci, int newNumFeatures)
    • predict

      @Command(usage="Make a prediction") public String predict(com.oracle.labs.mlrg.olcut.command.CommandInterpreter ci, String[] tokens)
    • main

      public static void main(String[] args)