Class CheckerboardDataSource

java.lang.Object
org.tribuo.classification.example.DemoLabelDataSource
org.tribuo.classification.example.CheckerboardDataSource
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>

public final class CheckerboardDataSource extends DemoLabelDataSource
Creates a data source using a 2d checkerboard of alternating classes.
  • Constructor Details

    • CheckerboardDataSource

      public CheckerboardDataSource(int numSamples, long seed, int numSquares, double min, double max)
      Creates a checkboard with the required number of squares per dimension, where each feature value lies between min and max.
      Parameters:
      numSamples - The number of samples to generate.
      seed - The RNG seed.
      numSquares - The number of squares.
      min - The minimum feature value.
      max - The maximum feature value.
  • Method Details