Interface Trainer<T extends Output<T>>

Type Parameters:
T - the type of the Output in the examples
All Superinterfaces:
com.oracle.labs.mlrg.olcut.config.Configurable, com.oracle.labs.mlrg.olcut.provenance.Provenancable<TrainerProvenance>
All Known Subinterfaces:
DecisionTreeTrainer<T>, IncrementalTrainer<T,U>, SparseTrainer<T>
All Known Implementing Classes:
AbstractCARTTrainer, AdaBoostTrainer, BaggingTrainer, CARTClassificationTrainer, CARTJointRegressionTrainer, CARTRegressionTrainer, DummyClassifierTrainer, DummyRegressionTrainer, ElasticNetCDTrainer, HashingTrainer, IndependentMultiLabelTrainer, KernelSVMTrainer, KMeansTrainer, KNNTrainer, LARSLassoTrainer, LARSTrainer, LibLinearClassificationTrainer, LibLinearRegressionTrainer, LibLinearTrainer, LibSVMAnomalyTrainer, LibSVMClassificationTrainer, LibSVMRegressionTrainer, LibSVMTrainer, LinearSGDTrainer, LinearSGDTrainer, LogisticRegressionTrainer, MultinomialNaiveBayesTrainer, RandomForestTrainer, SkeletalIndependentRegressionSparseTrainer, SkeletalIndependentRegressionTrainer, SLMTrainer, TensorflowCheckpointTrainer, TensorflowTrainer, TransformTrainer, XGBoostClassificationTrainer, XGBoostRegressionTrainer, XGBoostTrainer

public interface Trainer<T extends Output<T>> extends com.oracle.labs.mlrg.olcut.config.Configurable, com.oracle.labs.mlrg.olcut.provenance.Provenancable<TrainerProvenance>
An interface for things that can train predictive models.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final long
    Default seed used to initialise RNGs.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    The number of times this trainer instance has had it's train method invoked.
    default Model<T>
    train(Dataset<T> examples)
    Trains a predictive model using the examples in the given data set.
    train(Dataset<T> examples, Map<String, com.oracle.labs.mlrg.olcut.provenance.Provenance> runProvenance)
    Trains a predictive model using the examples in the given data set.

    Methods inherited from interface com.oracle.labs.mlrg.olcut.config.Configurable

    postConfig

    Methods inherited from interface com.oracle.labs.mlrg.olcut.provenance.Provenancable

    getProvenance
  • Field Details

  • Method Details

    • train

      default Model<T> train(Dataset<T> examples)
      Trains a predictive model using the examples in the given data set.
      Parameters:
      examples - the data set containing the examples.
      Returns:
      a predictive model that can be used to generate predictions for new examples.
    • train

      Model<T> train(Dataset<T> examples, Map<String, com.oracle.labs.mlrg.olcut.provenance.Provenance> runProvenance)
      Trains a predictive model using the examples in the given data set.
      Parameters:
      examples - the data set containing the examples.
      runProvenance - Training run specific provenance (e.g., fold number).
      Returns:
      a predictive model that can be used to generate predictions for new examples.
    • getInvocationCount

      The number of times this trainer instance has had it's train method invoked.

      This is used to determine how many times the trainer's RNG has been accessed to ensure replicability in the random number stream.

      Returns:
      The number of train invocations.