question: public double [ ] distributionForInstance ( Instance instance ) throws Exception { if ( ! m_MinimizeExpectedCost ) { return m_Classifier . distributionForInstance ( instance ) ; } double [ ] pred = m_Classifier . distributionForInstance ( instance ) ; double [ ] costs = m_CostMatrix . expectedCosts ( pred , instance ) ; int classIndex = Utils . minIndex ( costs ) ; for ( int i = 0 ; i < pred . length ; i ++ ) { if ( i == classIndex ) { pred [ i ] = 1.0 ; } else { pred [ i ] = 0.0 ; } } return pred ; }
target:  Returns class probabilities. When minimum expected cost approach is chosen, returns probability one for class with the minimum expected misclassification cost. Otherwise it returns the probability distribution returned by the base classifier.