@Override public Instances defineDataFormat() throws Exception {
  setOptions(getOptions());
  checkCoverage();
  Random random=new Random(getSeed());
  setRandom(random);
  Instances dataset;
  ArrayList<Attribute> attributes=new ArrayList<Attribute>(3);
  Attribute attribute;
  boolean classFlag=getClassFlag();
  ArrayList<String> classValues=null;
  if (classFlag) {
    classValues=new ArrayList<String>(getClusters().length);
  }
  ArrayList<String> boolValues=new ArrayList<String>(2);
  boolValues.add("false");
  boolValues.add("true");
  ArrayList<String> nomValues=null;
  for (int i=0; i < getNumAttributes(); i++) {
    if (m_booleanCols.isInRange(i)) {
      attribute=new Attribute("B" + i,boolValues);
    }
 else     if (m_nominalCols.isInRange(i)) {
      nomValues=new ArrayList<String>(m_numValues[i]);
      for (int j=0; j < m_numValues[i]; j++) {
        nomValues.add("value-" + j);
      }
      attribute=new Attribute("N" + i,nomValues);
    }
 else {
      attribute=new Attribute("X" + i);
    }
    attributes.add(attribute);
  }
  if (classFlag) {
    for (int i=0; i < getClusters().length; i++) {
      classValues.add("c" + i);
    }
    attribute=new Attribute("class",classValues);
    attributes.add(attribute);
  }
  dataset=new Instances(getRelationNameToUse(),attributes,0);
  if (classFlag) {
    dataset.setClassIndex(m_NumAttributes);
  }
  Instances format=new Instances(dataset,0);
  setDatasetFormat(format);
  for (int i=0; i < getClusters().length; i++) {
    SubspaceClusterDefinition cl=(SubspaceClusterDefinition)getClusters()[i];
    cl.setNumInstances(random);
    cl.setParent(this);
  }
  return dataset;
}

@ Override public Instances defineDataFormat ( ) throws Exception { setOptions ( getOptions ( ) ) ; checkCoverage ( ) ; Random random = new Random ( getSeed ( ) ) ; setRandom ( random ) ; Instances dataset ; ArrayList < Attribute > attributes = new ArrayList < Attribute > ( 3 ) ; Attribute attribute ; boolean classFlag = getClassFlag ( ) ; ArrayList < String > classValues = null ; if ( classFlag ) { classValues = new ArrayList < String > ( getClusters ( ) . length ) ; } ArrayList < String > boolValues = new ArrayList < String > ( 2 ) ; boolValues . add ( "false" ) ; boolValues . add ( "true" ) ; ArrayList < String > nomValues = null ; for ( int i = 0 ; i < getNumAttributes ( ) ; i ++ ) { if ( m_booleanCols . isInRange ( i ) ) { attribute = new Attribute ( "B" + i , boolValues ) ; } else if ( m_nominalCols . isInRange ( i ) ) { nomValues = new ArrayList < String > ( m_numValues [ i ] ) ; for ( int j = 0 ; j < m_numValues [ i ] ; j ++ ) { nomValues . add ( "value-" + j ) ; } attribute = new Attribute ( "N" + i , nomValues ) ; } else { attribute = new Attribute ( "X" + i ) ; } attributes . add ( attribute ) ; } if ( classFlag ) { for ( int i = 0 ; i < getClusters ( ) . length ; i ++ ) { classValues . add ( "c" + i ) ; } attribute = new Attribute ( "class" , classValues ) ; attributes . add ( attribute ) ; } dataset = new Instances ( getRelationNameToUse ( ) , attributes , 0 ) ; if ( classFlag ) { dataset . setClassIndex ( m_NumAttributes ) ; } Instances format = new Instances ( dataset , 0 ) ; setDatasetFormat ( format ) ; for ( int i = 0 ; i < getClusters ( ) . length ; i ++ ) { SubspaceClusterDefinition cl = ( SubspaceClusterDefinition ) getClusters ( ) [ i ] ; cl . setNumInstances ( random ) ; cl . setParent ( this ) ; } return dataset ; }
initializes the format for the dataset produced .
