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;
  }
}

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 ; } }
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 >
