Documentation of 'jsat.utils.GridDataGenerator' Java class
GridDataGenerator
jsat.utils

Class GridDataGenerator



  • public class GridDataGenerator
    extends java.lang.Object
    This is a utility to generate data in a grid fashion. Each data point will belong to a different class. By default, the data is generated such that the classes are trivially separable.

    All data points belong to a specific axis, and have noises added to them. For example, a 1 dimensional grid with 2 classes would have data points of the form 0+noise, and 1+noise. So long as the noise is less than 0.5, the data can be easily separated.
    • Constructor Summary

      Constructors 
      Constructor and Description
      GridDataGenerator()
      Creates a new grid data generator for a 2 x 5 with uniform noise in the range [-1/4, 1/4]
      GridDataGenerator(ContinuousDistribution noiseSource, int... dimensions)
      Creates a new Grid data generator, that can be queried for new data sets.
      GridDataGenerator(ContinuousDistribution noiseSource, java.util.Random rand, int... dimensions)
      Creates a new Grid data generator, that can be queried for new data sets.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      SimpleDataSet generateData(int samples)
      Generates a new data set.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • GridDataGenerator

        public GridDataGenerator(ContinuousDistribution noiseSource,
                                 java.util.Random rand,
                                 int... dimensions)
        Creates a new Grid data generator, that can be queried for new data sets.
        Parameters:
        noiseSource - the distribution that describes the noise that will be added to each data point. If no noise is used, each data point would lie exactly on its local axis.
        rand - the source of randomness that the noise will use
        dimensions - an array describing how many groups there will be. The length of the array dictates the number of dimensions in the data set, each value describes how many axis of that dimensions to use. The total number of classes is the product of these values.
        Throws:
        java.lang.ArithmeticException - if one of the dimension values is not a positive value, or a zero number of dimensions is given
      • GridDataGenerator

        public GridDataGenerator(ContinuousDistribution noiseSource,
                                 int... dimensions)
        Creates a new Grid data generator, that can be queried for new data sets.
        Parameters:
        noiseSource - the distribution that describes the noise that will be added to each data point. If no noise is used, each data point would lie exactly on its local axis.
        dimensions - an array describing how many groups there will be. The length of the array dictates the number of dimensions in the data set, each value describes how many axis of that dimensions to use. The total number of classes is the product of these values.
        Throws:
        java.lang.ArithmeticException - if one of the dimension values is not a positive value, or a zero number of dimensions is given
      • GridDataGenerator

        public GridDataGenerator()
        Creates a new grid data generator for a 2 x 5 with uniform noise in the range [-1/4, 1/4]
    • Method Detail

      • generateData

        public SimpleDataSet generateData(int samples)
        Generates a new data set.
        Parameters:
        samples - the number of sample data points to create for each class in the data set.
        Returns:
        A data set the contains the data points with matching class labels.

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.