public static String leafScoreFromDistribution ( double [ ] classDistribution , Instances instances ) { double sum = 0 , maxCount = 0 ; int maxIndex = 0 ; if ( classDistribution != null ) { sum = Utils . sum ( classDistribution ) ; maxIndex = Utils . maxIndex ( classDistribution ) ; maxCount = classDistribution [ maxIndex ] ; } return instances . classAttribute ( ) . value ( maxIndex ) ; }
Retrieves a String representing the score of the given class distribution .