@Override public Instances defineDataFormat() throws Exception {
  ArrayList<Attribute> atts;
  ArrayList<String> attValues;
  int i;
  m_Random=new Random(getSeed());
  m_nextClassShouldBeZero=true;
  m_lastLabel=Double.NaN;
  setNumExamplesAct(getNumExamples());
  atts=new ArrayList<Attribute>();
  atts.add(new Attribute("salary"));
  atts.add(new Attribute("commission"));
  atts.add(new Attribute("age"));
  attValues=new ArrayList<String>();
  for (i=0; i < 5; i++) {
    attValues.add("" + i);
  }
  atts.add(new Attribute("elevel",attValues));
  attValues=new ArrayList<String>();
  for (i=1; i <= 20; i++) {
    attValues.add("" + i);
  }
  atts.add(new Attribute("car",attValues));
  attValues=new ArrayList<String>();
  for (i=0; i < 9; i++) {
    attValues.add("" + i);
  }
  atts.add(new Attribute("zipcode",attValues));
  atts.add(new Attribute("hvalue"));
  atts.add(new Attribute("hyears"));
  atts.add(new Attribute("loan"));
  attValues=new ArrayList<String>();
  for (i=0; i < 2; i++) {
    attValues.add("" + i);
  }
  atts.add(new Attribute("group",attValues));
  m_DatasetFormat=new Instances(getRelationNameToUse(),atts,0);
  return m_DatasetFormat;
}

@ Override public Instances defineDataFormat ( ) throws Exception { ArrayList < Attribute > atts ; ArrayList < String > attValues ; int i ; m_Random = new Random ( getSeed ( ) ) ; m_nextClassShouldBeZero = true ; m_lastLabel = Double . NaN ; setNumExamplesAct ( getNumExamples ( ) ) ; atts = new ArrayList < Attribute > ( ) ; atts . add ( new Attribute ( "salary" ) ) ; atts . add ( new Attribute ( "commission" ) ) ; atts . add ( new Attribute ( "age" ) ) ; attValues = new ArrayList < String > ( ) ; for ( i = 0 ; i < 5 ; i ++ ) { attValues . add ( "" + i ) ; } atts . add ( new Attribute ( "elevel" , attValues ) ) ; attValues = new ArrayList < String > ( ) ; for ( i = 1 ; i <= 20 ; i ++ ) { attValues . add ( "" + i ) ; } atts . add ( new Attribute ( "car" , attValues ) ) ; attValues = new ArrayList < String > ( ) ; for ( i = 0 ; i < 9 ; i ++ ) { attValues . add ( "" + i ) ; } atts . add ( new Attribute ( "zipcode" , attValues ) ) ; atts . add ( new Attribute ( "hvalue" ) ) ; atts . add ( new Attribute ( "hyears" ) ) ; atts . add ( new Attribute ( "loan" ) ) ; attValues = new ArrayList < String > ( ) ; for ( i = 0 ; i < 2 ; i ++ ) { attValues . add ( "" + i ) ; } atts . add ( new Attribute ( "group" , attValues ) ) ; m_DatasetFormat = new Instances ( getRelationNameToUse ( ) , atts , 0 ) ; return m_DatasetFormat ; }
initializes the format for the dataset produced . must be called before the generateexample or generateexamples methods are used . re - initializes the random number generator with the given seed .
