private void calcPercentiles(){
  m_percentiles=new double[NUM_BUCKETS];
  if (m_rawScores.isEmpty()) {
    return;
  }
  Collections.sort(m_rawScores);
  final int numIntervals=m_rawScores.size();
  for (int i=0; i < NUM_BUCKETS; i++) {
    final int index=((numIntervals * i) / NUM_BUCKETS);
    m_percentiles[i]=m_rawScores.get(index);
  }
}

private void calcPercentiles ( ) { m_percentiles = new double [ NUM_BUCKETS ] ; if ( m_rawScores . isEmpty ( ) ) { return ; } Collections . sort ( m_rawScores ) ; final int numIntervals = m_rawScores . size ( ) ; for ( int i = 0 ; i < NUM_BUCKETS ; i ++ ) { final int index = ( ( numIntervals * i ) / NUM_BUCKETS ) ; m_percentiles [ i ] = m_rawScores . get ( index ) ; } }
calculate the values to determine percentiles by first sorting the log probabilities then multiply the number of intervals by a percentile ( i / num_buckets ) to retrieve the index at which to get the log probability score . this log probability score is the value for determining the percentile .
