if (m_Classifiers[i] != null) { m_ClassFilters[i].input(inst); m_ClassFilters[i].batchFinished(); double [] current = m_Classifiers[i]. distributionForInstance(m_ClassFilters[i].output()); for (int j = 0; j < m_ClassAttribute.numValues(); j++) { if (((MakeIndicator)m_ClassFilters[i]).getValueRange().isInRange(j)) { probs[j] += current[1]; } else { probs[j] += current[0]; }
m_ClassFilters[i].input(inst); m_ClassFilters[i].batchFinished(); double [] current = m_Classifiers[i]. distributionForInstance(m_ClassFilters[i].output()); for (int j = 0; j < m_ClassAttribute.numValues(); j++) { if (((MakeIndicator)m_ClassFilters[i]).getValueRange().isInRange(j)) { probs[j] += current[1]; } else { probs[j] += current[0];
  public double[] distributionForInstance(Instance inst) throws Exception {        if (m_Classifiers.length == 1) {      return m_Classifiers[0].distributionForInstance(inst);    }        double[] probs = new double[inst.numClasses()];    if (m_Method == METHOD_1_AGAINST_1) {          for(int i = 0; i < m_ClassFilters.length; i++) {	if (m_Classifiers[i] != null) {	  Instance tempInst = new Instance(inst); 	  tempInst.setDataset(m_TwoClassDataset);	  double [] current = m_Classifiers[i].distributionForInstance(tempInst);  	  Range range = new Range(((RemoveWithValues)m_ClassFilters[i])				  .getNominalIndices());	  range.setUpper(m_ClassAttribute.numValues());	  int[] pair = range.getSelection();	  if (current[0] > current[1]) probs[pair[0]] += 1.0;	  else probs[pair[1]] += 1.0;	}      }    } else {      // error correcting style methods      for(int i = 0; i < m_ClassFilters.length; i++) {	if (m_Classifiers[i] != null) {	  m_ClassFilters[i].input(inst);	  m_ClassFilters[i].batchFinished();	  double [] current = m_Classifiers[i].	    distributionForInstance(m_ClassFilters[i].output());	  for (int j = 0; j < m_ClassAttribute.numValues(); j++) {	    if (((MakeIndicator)m_ClassFilters[i]).getValueRange().isInRange(j)) {	      probs[j] += current[1];	    } else {	      probs[j] += current[0];	    }	  }	}      }    }        if (Utils.gr(Utils.sum(probs), 0)) {      Utils.normalize(probs);      return probs;    } else {      return m_ZeroR.distributionForInstance(inst);    }  }