Class LinearSGDOptions
java.lang.Object
org.tribuo.classification.sgd.linear.LinearSGDOptions
- All Implemented Interfaces:
com.oracle.labs.mlrg.olcut.config.Options,ClassificationOptions<LinearSGDTrainer>
CLI options for training a linear classifier.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionintNumber of SGD epochs.intLog the objective after n examples.intMinibatch size.Loss function.longSets the random seed for the LinearSGDTrainer.The gradient descent optimiser options.Fields inherited from interface com.oracle.labs.mlrg.olcut.config.Options
header -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetLoss()Returns the loss function specified in the arguments.Constructs the trainer based on the provided arguments.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.oracle.labs.mlrg.olcut.config.Options
getOptionsDescription
-
Field Details
-
sgoOptions
The gradient descent optimiser options. -
sgdEpochs
@Option(longName="sgd-epochs", usage="Number of SGD epochs. Defaults to 5.") public int sgdEpochsNumber of SGD epochs. Defaults to 5. -
sgdObjective
@Option(longName="sgd-objective", usage="Loss function. Defaults to LOG.") public LinearSGDOptions.LossEnum sgdObjectiveLoss function. Defaults to LOG. -
sgdLoggingInterval
@Option(longName="sgd-logging-interval", usage="Log the objective after <int> examples. Defaults to 100.") public int sgdLoggingIntervalLog the objective after n examples. Defaults to 100. -
sgdMinibatchSize
@Option(longName="sgd-minibatch-size", usage="Minibatch size. Defaults to 1.") public int sgdMinibatchSizeMinibatch size. Defaults to 1. -
sgdSeed
@Option(longName="sgd-seed", usage="Sets the random seed for the LinearSGDTrainer.") public long sgdSeedSets the random seed for the LinearSGDTrainer.
-
-
Constructor Details
-
LinearSGDOptions
public LinearSGDOptions()
-
-
Method Details
-
getLoss
Returns the loss function specified in the arguments.- Returns:
- The loss function.
-
getTrainer
Description copied from interface:ClassificationOptionsConstructs the trainer based on the provided arguments.- Specified by:
getTrainerin interfaceClassificationOptions<LinearSGDTrainer>- Returns:
- The trainer.
-