public final class DummyRegressionTrainer extends Object implements Trainer<Regressor>
Modifier and Type | Class and Description |
---|---|
static class |
DummyRegressionTrainer.DummyRegressionTrainerProvenance
Deprecated.
|
static class |
DummyRegressionTrainer.DummyType
Types of dummy regression model.
|
DEFAULT_SEED
Modifier and Type | Method and Description |
---|---|
static DummyRegressionTrainer |
createConstantTrainer(double value)
Creates a trainer which create models which return a fixed value.
|
static DummyRegressionTrainer |
createGaussianTrainer(long seed)
Creates a trainer which create models which sample the output from a gaussian distribution fit to the training data.
|
static DummyRegressionTrainer |
createMeanTrainer()
Creates a trainer which create models which return the mean of the training data.
|
static DummyRegressionTrainer |
createMedianTrainer()
Creates a trainer which create models which return the median of the training data.
|
static DummyRegressionTrainer |
createQuartileTrainer(double value)
Creates a trainer which create models which return the value at the specified fraction of the sorted training data.
|
int |
getInvocationCount()
The number of times this trainer instance has had it's train method invoked.
|
TrainerProvenance |
getProvenance() |
void |
postConfig()
Used by the OLCUT configuration system, and should not be called by external code.
|
String |
toString() |
DummyRegressionModel |
train(Dataset<Regressor> examples,
Map<String,com.oracle.labs.mlrg.olcut.provenance.Provenance> instanceProvenance)
Trains a predictive model using the examples in the given data set.
|
public void postConfig()
postConfig
in interface com.oracle.labs.mlrg.olcut.config.Configurable
public DummyRegressionModel train(Dataset<Regressor> examples, Map<String,com.oracle.labs.mlrg.olcut.provenance.Provenance> instanceProvenance)
Trainer
public int getInvocationCount()
Trainer
This is used to determine how many times the trainer's RNG has been accessed to ensure replicability in the random number stream.
getInvocationCount
in interface Trainer<Regressor>
public TrainerProvenance getProvenance()
getProvenance
in interface com.oracle.labs.mlrg.olcut.provenance.Provenancable<TrainerProvenance>
public static DummyRegressionTrainer createConstantTrainer(double value)
value
- The value to returnpublic static DummyRegressionTrainer createGaussianTrainer(long seed)
seed
- The RNG seed.public static DummyRegressionTrainer createMeanTrainer()
public static DummyRegressionTrainer createMedianTrainer()
public static DummyRegressionTrainer createQuartileTrainer(double value)
value
- The quartile value.Copyright © 2015–2021 Oracle and/or its affiliates. All rights reserved.