code: public OnLineStatistics[] getOnlineColumnStats(boolean useWeights)
      {
          OnLineStatistics[] stats = new OnLineStatistics[numNumerVals];
          for(int i = 0; i < stats.length; i++)
              stats[i] = new OnLineStatistics();
          
          double totalSoW = 0.0;
          
          /**
           * We got to skip nans, count their weight in each column so that we can still fast count zeros
           */
          double[] nanWeight = new double[numNumerVals];
          int pos = 0;
          
          for(Iterator<DataPoint> iter = getDataPointIterator(); iter.hasNext(); )
          {
              DataPoint dp = iter.next();
              
              double weight = useWeights ? getWeight(pos++): 1;
              totalSoW += weight;
  
              Vec v = dp.getNumericalValues();
              for (IndexValue iv : v)
                  if (Double.isNaN(iv.getValue()))//count it so we can fast count zeros right later
                      nanWeight[iv.getIndex()] += weight;
                  else
                      stats[iv.getIndex()].add(iv.getValue(), weight);
          }
          
          double expected = totalSoW;
          //Add zero counts back in
          for(int i = 0; i < stats.length; i++)
              stats[i].add(0.0, expected-stats[i].getSumOfWeights()-nanWeight[i]);
          
          return stats;
      }
docs: Returns summary statistics computed in an online fashion for each numeric
  variable. This returns all summary statistics, but can be less
  numerically stable and uses more memory. <br>
  NaNs / missing values will be ignored in the statistics for each column.
  
  @param useWeights {@code true} to return the weighted statistics,
  unweighted otherwise.
  @return an array of summary statistics