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
-
Field Summary
Modifier and TypeFieldDescriptionint
Number of SGD epochs.int
Log the objective after n examples.int
Minibatch size.Loss function.long
Sets 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
-
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, wait
Methods 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:ClassificationOptions
Constructs the trainer based on the provided arguments.- Specified by:
getTrainer
in interfaceClassificationOptions<LinearSGDTrainer>
- Returns:
- The trainer.
-