public Instances defineDataFormat() throws Exception {

    // initialize
    setOptions(getOptions());

    checkCoverage();

    Random random = new Random (getSeed());
    setRandom(random);
    Instances dataset;
    FastVector attributes = new FastVector(3);
    Attribute attribute;
    boolean classFlag = getClassFlag();

    FastVector classValues = null;
    if (classFlag) 
      classValues = new FastVector(getClusters().length);     
    FastVector boolValues = new FastVector(2);
    boolValues.addElement("false");
    boolValues.addElement("true");
    FastVector nomValues = null;

    // define dataset
    for (int i = 0; i < getNumAttributes(); i++) {
      // define boolean attribute
      if (m_booleanCols.isInRange(i)) {
        attribute = new Attribute("B" + i, boolValues);
      } 
      else if (m_nominalCols.isInRange(i)) {
        // define nominal attribute
        nomValues = new FastVector(m_numValues[i]);
        for (int j = 0; j < m_numValues[i]; j++)
          nomValues.addElement("value-" + j);
        attribute = new Attribute("N" + i, nomValues);
      } 
      else {
        // numerical attribute
        attribute = new Attribute("X" + i); 
      }
      attributes.addElement(attribute);
    }

    if (classFlag) {
      for (int i = 0; i < getClusters().length; i++)
        classValues.addElement("c" + i);
      attribute = new Attribute ("class", classValues); 
      attributes.addElement(attribute);
    }

    dataset = new Instances(getRelationNameToUse(), attributes, 0);
    if (classFlag) 
      dataset.setClassIndex(m_NumAttributes);

    // set dataset format of this class
    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; 
  }