public double evaluateSubset (BitSet subset) throws Exception {
    int [] fs;
    int i;
    int count = 0;

    for (i=0;i<m_numAttribs;i++) {
      if (subset.get(i)) {
	count++;
      }
    }

    double [] instArray = new double[count];
    int index = 0;
    fs = new int[count];
    for (i=0;i<m_numAttribs;i++) {
      if (subset.get(i)) {
	fs[index++] = i;
      }
    }
    
    // create new hash table
    m_table = new Hashtable((int)(m_numInstances * 1.5));
    
    for (i=0;i<m_numInstances;i++) {
      Instance inst = m_trainInstances.instance(i);
      for (int j=0;j<fs.length;j++) {
	if (fs[j] == m_classIndex) {
	  throw new Exception("A subset should not contain the class!");
	}
	if (inst.isMissing(fs[j])) {
	  instArray[j] = Double.MAX_VALUE;
	} else {
	  instArray[j] = inst.value(fs[j]);
	}
      }
      insertIntoTable(inst, instArray);
    }

    return consistencyCount();
  }