Class LogisticRegressionTrainer
java.lang.Object
org.tribuo.common.sgd.AbstractSGDTrainer<T,U,V,LinearParameters>
org.tribuo.common.sgd.AbstractLinearSGDTrainer<Label,Integer,LinearSGDModel>
org.tribuo.classification.sgd.linear.LinearSGDTrainer
org.tribuo.classification.sgd.linear.LogisticRegressionTrainer
- All Implemented Interfaces:
com.oracle.labs.mlrg.olcut.config.Configurable
,com.oracle.labs.mlrg.olcut.provenance.Provenancable<TrainerProvenance>
,Trainer<Label>
,WeightedExamples
A logistic regression trainer that uses a reasonable objective, optimiser,
number of epochs and minibatch size. If you wish to modify any of these
aspects, you can create your own LinearSGDTrainer.
This is strictly a convenience class for folks who are looking for a simple logistic regression.
-
Field Summary
Fields inherited from class org.tribuo.common.sgd.AbstractSGDTrainer
addBias, epochs, loggingInterval, minibatchSize, optimiser, rng, seed, shuffle
Fields inherited from interface org.tribuo.Trainer
DEFAULT_SEED, INCREMENT_INVOCATION_COUNT
-
Constructor Summary
ConstructorDescriptionConstructs a simple logistic regression, usingAdaGrad
with a learning rate of 1.0 as the gradient optimizer, training for 5 epochs. -
Method Summary
Methods inherited from class org.tribuo.classification.sgd.linear.LinearSGDTrainer
createModel, getModelClassName, getObjective, getTarget, toString
Methods inherited from class org.tribuo.common.sgd.AbstractLinearSGDTrainer
createParameters, getName
Methods inherited from class org.tribuo.common.sgd.AbstractSGDTrainer
getInvocationCount, getProvenance, postConfig, setInvocationCount, setShuffle, shuffleInPlace, train, train, train
-
Constructor Details
-
LogisticRegressionTrainer
public LogisticRegressionTrainer()Constructs a simple logistic regression, usingAdaGrad
with a learning rate of 1.0 as the gradient optimizer, training for 5 epochs. It's equivalent to this:new LinearSGDTrainer(new LogMulticlass(), new AdaGrad(1.0, 0.1), 5, Trainer.DEFAULT_SEED);
-