code: public SimpleDataSet generateData(int samples)
      {
          int totalClasses = 1;
          for(int d : dimensions)
              totalClasses *= d;
          catDataInfo = new CategoricalData[] { new CategoricalData(totalClasses) } ;
          List<DataPoint> dataPoints = new ArrayList<DataPoint>(totalClasses*samples);
          int[] curClassPointer = new int[1];
                  
          for(int i = 0; i < dimensions[0]; i++)
          {
              int[] curDim = new int[dimensions.length];
              curDim[0] = i;
              addSamples(curClassPointer, 0, samples, dataPoints, curDim);
          }
          
          return new SimpleDataSet(dataPoints);
      }
docs: Generates a new data set.
  
  @param samples the number of sample data points to create for each class in the data set.
  @return A data set the contains the data points with matching class labels.