Class TrainTestHelper

java.lang.Object
org.tribuo.classification.TrainTestHelper

public final class TrainTestHelper extends Object
This class provides static methods used by the demo classes in each classification backend.
  • Method Details

    • run

      public static Model<Label> run(com.oracle.labs.mlrg.olcut.config.ConfigurationManager cm, DataOptions dataOptions, Trainer<Label> trainer) throws IOException
      This method trains a model on the specified training data, and evaluates it on the specified test data. It writes out the timing to it's logger, and the statistical performance to standard out. If set, the model is written out to the specified path on disk.
      Parameters:
      cm - The configuration manager which knows the arguments.
      dataOptions - The data options which specify the training and test data.
      trainer - The trainer to use.
      Returns:
      The trained model.
      Throws:
      IOException - If the data failed to load.