@Override public double[] distributionForInstance(Instance instance) throws Exception {
  m_ReplaceMissingValues.input(instance);
  instance=m_ReplaceMissingValues.output();
  m_AttFilter.input(instance);
  instance=m_AttFilter.output();
  m_NominalToBinary.input(instance);
  instance=m_NominalToBinary.output();
  double[] instDat=new double[m_NumPredictors + 1];
  int j=1;
  instDat[0]=1;
  for (int k=0; k <= m_NumPredictors; k++) {
    if (k != m_ClassIndex) {
      instDat[j++]=instance.value(k);
    }
  }
  double[] distribution=evaluateProbability(instDat);
  return distribution;
}

@ Override public double [ ] distributionForInstance ( Instance instance ) throws Exception { m_ReplaceMissingValues . input ( instance ) ; instance = m_ReplaceMissingValues . output ( ) ; m_AttFilter . input ( instance ) ; instance = m_AttFilter . output ( ) ; m_NominalToBinary . input ( instance ) ; instance = m_NominalToBinary . output ( ) ; double [ ] instDat = new double [ m_NumPredictors + 1 ] ; int j = 1 ; instDat [ 0 ] = 1 ; for ( int k = 0 ; k <= m_NumPredictors ; k ++ ) { if ( k != m_ClassIndex ) { instDat [ j ++ ] = instance . value ( k ) ; } } double [ ] distribution = evaluateProbability ( instDat ) ; return distribution ; }
computes the distribution for a given instance
