public int mostLikely ( ) { int top = 0 ; for ( int i = 1 ; i < probabilities . length ; i ++ ) { if ( probabilities [ i ] > probabilities [ top ] ) top = i ; } return top ; }
Returns the category that is the most likely according to the current probability values