public class NonlinearGaussianDataSource extends Object implements ConfigurableDataSource<Regressor>
The features are drawn from a uniform distribution over the range.
Modifier and Type | Class and Description |
---|---|
static class |
NonlinearGaussianDataSource.NonlinearGaussianDataSourceProvenance
Provenance for
NonlinearGaussianDataSource . |
Constructor and Description |
---|
NonlinearGaussianDataSource(int numSamples,
float[] weights,
float intercept,
float variance,
float xZeroMin,
float xZeroMax,
float xOneMin,
float xOneMax,
long seed)
Generates a single dimensional output drawn from
N(w_0*x_0 + w_1*x_1 + w_2*x_1*x_0 + w_3*x_1*x_1*x_1 + intercept,variance).
|
Modifier and Type | Method and Description |
---|---|
static Dataset<Regressor> |
generateDataset(int numSamples,
float[] weights,
float intercept,
float variance,
float xZeroMin,
float xZeroMax,
float xOneMin,
float xOneMax,
long seed)
Generates a single dimensional output drawn from
N(w_0*x_0 + w_1*x_1 + w_2*x_1*x_0 + w_3*x_1*x_1*x_1 + 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 NonlinearGaussianDataSource(int numSamples, float[] weights, float intercept, float variance, float xZeroMin, float xZeroMax, float xOneMin, float xOneMax, long seed)
The features are drawn from a uniform distribution over the range.
numSamples
- The size of the output dataset.weights
- The feature weights.intercept
- The y intercept of the line.variance
- The variance of the gaussian.xZeroMin
- The minimum x_0 value (inclusive).xZeroMax
- The maximum x_0 value (exclusive).xOneMin
- The minimum x_1 value (inclusive).xOneMax
- The maximum x_1 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[] weights, float intercept, float variance, float xZeroMin, float xZeroMax, float xOneMin, float xOneMax, long seed)
The features are drawn from a uniform distribution over the range.
numSamples
- The size of the output dataset.weights
- The feature weights.intercept
- The y intercept of the line.variance
- The variance of the gaussian.xZeroMin
- The minimum x_0 value (inclusive).xZeroMax
- The maximum x_0 value (exclusive).xOneMin
- The minimum x_1 value (inclusive).xOneMax
- The maximum x_1 value (exclusive).seed
- The rng seed to use.Copyright © 2015–2021 Oracle and/or its affiliates. All rights reserved.