private Instances subset(Instances insts, HotTestDetails test) {
      Instances sub = new Instances(insts, insts.numInstances());
      for (int i = 0; i < insts.numInstances(); i++) {
        Instance temp = insts.instance(i);
        if (!temp.isMissing(test.m_splitAttIndex)) {
          if (insts.attribute(test.m_splitAttIndex).isNominal()) {
            if (temp.value(test.m_splitAttIndex) == test.m_splitValue) {
              sub.add(temp);
            }
          } else {
            if (test.m_lessThan) {
              if (temp.value(test.m_splitAttIndex) <= test.m_splitValue) {
                sub.add(temp);
              }
            } else {
              if (temp.value(test.m_splitAttIndex) > test.m_splitValue) {
                sub.add(temp);
              }
            }
          }
        }
      }
      sub.compactify();
      return sub;
    }