Package org.tribuo

Class ModelExplorer

java.lang.Object
org.tribuo.ModelExplorer
All Implemented Interfaces:
com.oracle.labs.mlrg.olcut.command.CommandGroup

public class ModelExplorer extends Object implements com.oracle.labs.mlrg.olcut.command.CommandGroup
A command line interface for loading in models and inspecting their feature and output spaces.
  • Constructor Details

    • ModelExplorer

      public ModelExplorer()
      Builds a new model explorer shell.
  • Method Details

    • getName

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

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

      public org.jline.reader.Completer[] fileCompleter()
      Completers for files.
      Returns:
      The completers for file commands.
    • 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, boolean protobuf)
      Loads a model.
      Parameters:
      ci - The shell instance.
      path - The path to load.
      protobuf - If the model is a protobuf.
      Returns:
      A status string.
    • generatesProbabilities

      @Command(usage="Does the model generate probabilities") public String generatesProbabilities(com.oracle.labs.mlrg.olcut.command.CommandInterpreter ci)
      Checks if the model generates probabilities.
      Parameters:
      ci - The command shell.
      Returns:
      A status string.
    • modelProvenance

      @Command(usage="Shows the model provenance") public String modelProvenance(com.oracle.labs.mlrg.olcut.command.CommandInterpreter ci)
      Displays the model provenance.
      Parameters:
      ci - The command shell.
      Returns:
      A status string.
    • featureInfo

      @Command(usage="Shows the information on a particular feature") public String featureInfo(com.oracle.labs.mlrg.olcut.command.CommandInterpreter ci, String featureName)
      Shows a specific feature's information.
      Parameters:
      ci - The command shell.
      featureName - The feature name.
      Returns:
      A status string.
    • outputInfo

      @Command(usage="Shows the output information.") public String outputInfo(com.oracle.labs.mlrg.olcut.command.CommandInterpreter ci)
      Displays the output info.
      Parameters:
      ci - The command shell.
      Returns:
      A status string.
    • 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)
      Displays the top n features.
      Parameters:
      ci - The command shell
      numFeatures - The number of features to display.
      Returns:
      A status string.
    • numFeatures

      @Command(usage="Shows the number of features in the model") public String numFeatures(com.oracle.labs.mlrg.olcut.command.CommandInterpreter ci)
      Displays the number of features.
      Parameters:
      ci - The command shell.
      Returns:
      A status string.
    • 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)
      Shows the number of features which occurred more than min count times.
      Parameters:
      ci - The command shell.
      minCount - The minimum occurrence count.
      Returns:
      A status string.
    • main

      public static void main(String[] args)
      Entry point.
      Parameters:
      args - CLI args.