public float[] getFeatureCounts() {
    float[] counts = new float[featureIndex.size()];
    for (int i = 0, m = size; i < m; i++) {
      for (int j = 0, n = data[i].length; j < n; j++) {
        counts[data[i][j]] += 1.0;
      }
    }
    return counts;
  }
public float [ ] getFeatureCounts ( ) { float [ ] counts = new float [ featureIndex . size ( ) ] ; for ( int i = 0 , m = size ; i < m ; i ++ ) { for ( int j = 0 , n = data [ i ] . length ; j < n ; j ++ ) { counts [ data [ i ] [ j ] ] += 1.0 ; } } return counts ; }
Get the total count (over all data instances) of each feature

@return an array containing the counts (indexed by index)