prob *= distributions[0][0];
probs[i] = distributions[0][0];
  public double [] distributionForInstance(Instance inst) throws Exception {        if (m_Classifiers.length == 1) {      return ((DistributionClassifier)m_Classifiers[0])        .distributionForInstance(inst);    }    double [] probs = new double[inst.numClasses()];        double [][] distributions = new double[m_ClassFilters.length][0];    for(int i = 0; i < m_ClassFilters.length; i++) {      m_ClassFilters[i].input(inst);      m_ClassFilters[i].batchFinished();            distributions[i] = ((DistributionClassifier)m_Classifiers[i])	.distributionForInstance(m_ClassFilters[i].output());          }    int z = 0;    for (int i = 0; i < inst.numClasses(); i++) {      double prob = 1.0;      if (i == 0) {	prob *= distributions[0][0];      } else if (i == inst.numClasses() - 1) {	prob *= distributions[z][1];      } else {	prob *= distributions[z][1];	prob *= distributions[z+1][0];	z++;      }      probs[i] = prob;    }        // calculate the probability of each vector    /*boolean [] bs = new boolean[distributions.length];    int z = 0;    for (int i = 0; i < inst.numClasses(); i++) {      double prob = 1.0;            for (int j = 0; j < distributions.length; j++) {	prob *= distributions[j][(bs[j] == true) ? 1 : 0];      }      if (z < distributions.length) {	bs[z] = true;      }      probs[z++] = prob;      }*/        if (Utils.gr(Utils.sum(probs), 0)) {      Utils.normalize(probs);      return probs;    } else {      return m_ZeroR.distributionForInstance(inst);    }  }