Class GaussianLabelDataSource
java.lang.Object
org.tribuo.classification.example.DemoLabelDataSource
org.tribuo.classification.example.GaussianLabelDataSource
- All Implemented Interfaces:
- com.oracle.labs.mlrg.olcut.config.Configurable,- com.oracle.labs.mlrg.olcut.provenance.Provenancable<DataSourceProvenance>,- Iterable<Example<Label>>,- ConfigurableDataSource<Label>,- DataSource<Label>
A data source for two classes generated from separate Gaussians.
- 
Nested Class SummaryNested classes/interfaces inherited from class org.tribuo.classification.example.DemoLabelDataSourceDemoLabelDataSource.DemoLabelDataSourceProvenance
- 
Field SummaryFields inherited from class org.tribuo.classification.example.DemoLabelDataSourceexamples, factory, FIRST_CLASS, numSamples, rng, SECOND_CLASS, seed, X1, X2
- 
Constructor SummaryConstructorsConstructorDescriptionGaussianLabelDataSource(int numSamples, long seed, double[] firstMean, double[] firstCovarianceMatrix, double[] secondMean, double[] secondCovarianceMatrix) Constructs a data source which contains two classes where each class is sampled from a 2d Gaussian with the specified parameters.
- 
Method SummaryMethods inherited from class org.tribuo.classification.example.DemoLabelDataSourcegetOutputFactory, getProvenance, iteratorMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.IterableforEach, spliterator
- 
Constructor Details- 
GaussianLabelDataSourcepublic GaussianLabelDataSource(int numSamples, long seed, double[] firstMean, double[] firstCovarianceMatrix, double[] secondMean, double[] secondCovarianceMatrix) Constructs a data source which contains two classes where each class is sampled from a 2d Gaussian with the specified parameters.- Parameters:
- numSamples- The number of samples to draw.
- seed- The RNG seed.
- firstMean- The mean of class one's Gaussian.
- firstCovarianceMatrix- The covariance matrix of class one's Gaussian.
- secondMean- The mean of class two's Gaussian.
- secondCovarianceMatrix- The covariance matrix of class two's Gaussian.
 
 
- 
- 
Method Details- 
postConfigpublic void postConfig()Used by the OLCUT configuration system, and should not be called by external code.- Specified by:
- postConfigin interface- com.oracle.labs.mlrg.olcut.config.Configurable
- Overrides:
- postConfigin class- DemoLabelDataSource
 
- 
generateDescription copied from class:DemoLabelDataSourceGenerates the examples using the configured fields.Is called internally by DemoLabelDataSource.postConfig().- Specified by:
- generatein class- DemoLabelDataSource
- Returns:
- The generated examples.
 
- 
toString
 
-