@Override public Instances defineDataFormat() throws Exception {
  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>(m_NumClusters);
  }
  for (int i=0; i < getNumAttributes(); i++) {
    attribute=new Attribute("X" + i);
    attributes.add(attribute);
  }
  if (classFlag) {
    for (int i=0; i < m_NumClusters; i++) {
      classValues.add("c" + i);
    }
    attribute=new Attribute("class",classValues);
    attributes.add(attribute);
  }
  dataset=new Instances(getRelationNameToUse(),attributes,0);
  if (classFlag) {
    dataset.setClassIndex(getNumAttributes());
  }
  Instances format=new Instances(dataset,0);
  setDatasetFormat(format);
  m_ClusterList=defineClusters(random);
  return dataset;
}

@ Override public Instances defineDataFormat ( ) throws Exception { 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 > ( m_NumClusters ) ; } for ( int i = 0 ; i < getNumAttributes ( ) ; i ++ ) { attribute = new Attribute ( "X" + i ) ; attributes . add ( attribute ) ; } if ( classFlag ) { for ( int i = 0 ; i < m_NumClusters ; i ++ ) { classValues . add ( "c" + i ) ; } attribute = new Attribute ( "class" , classValues ) ; attributes . add ( attribute ) ; } dataset = new Instances ( getRelationNameToUse ( ) , attributes , 0 ) ; if ( classFlag ) { dataset . setClassIndex ( getNumAttributes ( ) ) ; } Instances format = new Instances ( dataset , 0 ) ; setDatasetFormat ( format ) ; m_ClusterList = defineClusters ( random ) ; return dataset ; }
initializes the format for the dataset produced .
