public class GaussianDataSource extends Object implements ConfigurableDataSource<Regressor>
The single feature is drawn from a uniform distribution over the range.
Set slope to zero to draw from a gaussian.
Modifier and Type | Class and Description |
---|---|
static class |
GaussianDataSource.GaussianDataSourceProvenance
Provenance for
GaussianDataSource . |
Constructor and Description |
---|
GaussianDataSource(int numSamples,
float slope,
float intercept,
float variance,
float xMin,
float xMax,
long seed)
Generates a single dimensional output drawn from N(slope*x + intercept,variance).
|
Modifier and Type | Method and Description |
---|---|
static Dataset<Regressor> |
generateDataset(int numSamples,
float slope,
float intercept,
float variance,
float xMin,
float xMax,
long seed)
Generates a single dimensional output drawn from N(slope*x + intercept,variance).
|
OutputFactory<Regressor> |
getOutputFactory()
Returns the OutputFactory associated with this Output subclass.
|
DataSourceProvenance |
getProvenance() |
Iterator<Example<Regressor>> |
iterator() |
void |
postConfig()
Used by the OLCUT configuration system, and should not be called by external code.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public GaussianDataSource(int numSamples, float slope, float intercept, float variance, float xMin, float xMax, long seed)
The single feature is drawn from a uniform distribution over the range.
Set slope to zero to draw from a gaussian.
numSamples
- The size of the output dataset.slope
- The slope of the line.intercept
- The y intercept of the line.variance
- The variance of the gaussian.xMin
- The minimum x value (inclusive).xMax
- The maximum x value (exclusive).seed
- The rng seed to use.public void postConfig()
postConfig
in interface com.oracle.labs.mlrg.olcut.config.Configurable
public OutputFactory<Regressor> getOutputFactory()
DataSource
getOutputFactory
in interface DataSource<Regressor>
public DataSourceProvenance getProvenance()
getProvenance
in interface com.oracle.labs.mlrg.olcut.provenance.Provenancable<DataSourceProvenance>
public static Dataset<Regressor> generateDataset(int numSamples, float slope, float intercept, float variance, float xMin, float xMax, long seed)
The single feature is drawn from a uniform distribution over the range.
Set slope to zero to draw from a gaussian.
numSamples
- The size of the output dataset.slope
- The slope of the line.intercept
- The y intercept of the line.variance
- The variance of the gaussian.xMin
- The minimum x value (inclusive).xMax
- The maximum x value (exclusive).seed
- The rng seed to use.Copyright © 2015–2021 Oracle and/or its affiliates. All rights reserved.