question: public Vector < Integer > findCentralTendencies ( double [ ] predProbs ) { int centralTValue = 0 ; int currentValue = 0 ; Vector < Integer > centralTClasses ; centralTClasses = new Vector < Integer > ( ) ; for ( int i = 0 ; i < predProbs . length ; i ++ ) { currentValue = ( int ) predProbs [ i ] ; if ( currentValue > centralTValue ) { centralTClasses . clear ( ) ; centralTClasses . addElement ( new Integer ( i ) ) ; centralTValue = currentValue ; } else if ( currentValue != 0 && currentValue == centralTValue ) { centralTClasses . addElement ( new Integer ( i ) ) ; } } if ( centralTValue != 0 ) { return centralTClasses ; } else { return null ; } }
target:  Finds the central tendency, given the classifications for an instance. Where the central tendency is defined as the class that was most commonly selected for a given instance.<p> For example, instance 'x' may be classified out of 3 classes y = {1, 2, 3}, so if x is classified 10 times, and is classified as follows, '1' = 2 times, '2' = 5 times and '3' = 3 times. Then the central tendency is '2'. <p> However, it is important to note that this method returns a list of all classes that have the highest number of classifications. In cases where there are several classes with the largest number of classifications, then all of these classes are returned. For example if 'x' is classified '1' = 4 times, '2' = 4 times and '3' = 2 times. Then '1' and '2' are returned.<p>