Documentation of 'kcl.waterloo.math.ColumnStats' Java class
ColumnStats
kcl.waterloo.math

Class ColumnStats



  • public class ColumnStats
    extends java.lang.Object
    Provides basic statistics for the columns of a double[][] array. Columns should contain the same number of elements. Missing values should be entered as NaNs. Statistics available are :

    Sum

    Mean

    Variance

    Standard deviation

    Skew

    Kurtosis

    Minimum

    Maximum

    Median

    Upper and Lower percentiles

    Number of valid (non-NaN) values

    Geometric mean

    NaNs are treated as missing values and discounted from all calculations.

    An internal matrix contains the following parameters in the rows specified by ColumnStats.X where X is a static final int.

    ColumnStats.SUM the sum of values.

    ColumnStats.SUMDELTA2 the sum of squares of residuals.

    ColumnStats.SUMDELTA3 the sum of cubes of residuals.

    ColumnStats.SUMDELTA4 the sum of residuals to power 4.

    ColumnStats.MIN minimum value.

    ColumnStats.MAX maximum value.

    ColumnStats.MEDIAN median value.

    ColumnStats.LOWER lower percent.

    ColumnStats.UPPER upper percent.

    ColumnStats.SUMLOG sum of logs.

    ColumnStats.N number of observations (discounting NaNs).

    ColumnStats.Pct the requested percent (0 to 50):

    LOWER contains these values while UPPER contains values for percent = (100-ColumnStats.Pct).

    • Constructor Summary

      Constructors 
      Constructor and Description
      ColumnStats(double[][] data)
      Returns statistics using 25th/75th percentiles
      ColumnStats(double[][] data, int percentile)
      Returns statistics using specified percentiles
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      int getDimension()
      Returns the number of columns for the input array.
      double[][] getGeometricMean()
      Returns the geometric mean for each column of the data.
      double[][] getKurtosis()
      Returns the kurtosis of the data in each column of the input.
      double[][] getLower()
      Returns the lower pecentile for each column of the data.
      double[][] getMaximum()
      Returns the maximum value for each column of the data.
      double[][] getMean()
      Returns the mean of the data in each column of the input.
      double[][] getMedian()
      Returns the median value for each column of the data.
      double[][] getMinimum()
      Returns the minimum value for each column of the data.
      double[][] getN()
      Returns the number of data points for each column of the data.
      double getPercentile()
      Returns the lower pecentile used.
      double[][] getSD()
      Returns the standard deviation of the data in each column of the input.
      double[][] getSkew()
      Returns the skew of the data in each column of the input.
      double[][] getSum()
      Returns the sum of the data in each column of the input.
      double[][] getSummary()
      Returns a copy of the intermediate array used in calculations.
      double[][] getUpper()
      Returns the upper pecentile for each column of the data.
      double[][] getVariance()
      Returns the variance of the data in each column of the input.
      boolean isKurtosisCorrected()
      Returns true if bias correction is to be applied to the kurtosis
      boolean isSkewCorrected()
      Returns true if bias correction is to be applied to the skew
      boolean isVarianceCorrected()
      Returns true if bias correction is to be applied to the variance
      void setKurtosisCorrected(boolean flag)
      Sets bias correction mode for the kurtosis
      void setSkewCorrected(boolean flag)
      Sets bias correction mode for the skew
      void setVarianceCorrected(boolean flag)
      Sets bias correction mode for the variance (and standard deviation)
      java.lang.String toString() 
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ColumnStats

        public ColumnStats(double[][] data)
        Returns statistics using 25th/75th percentiles
        Parameters:
        data - the data to analyze
      • ColumnStats

        public ColumnStats(double[][] data,
                           int percentile)
        Returns statistics using specified percentiles
        Parameters:
        data - the data to analyze
        percentile - the percentiles to use
    • Method Detail

      • getDimension

        public int getDimension()
        Returns the number of columns for the input array.
        Returns:
        number of columns
      • getSum

        public double[][] getSum()
        Returns the sum of the data in each column of the input.
        Returns:
        the sum
      • getMean

        public double[][] getMean()
        Returns the mean of the data in each column of the input.
        Returns:
        the mean
      • getVariance

        public double[][] getVariance()
        Returns the variance of the data in each column of the input. Bias correction is applied if varianeCorrected is true.
        Returns:
        the variance
      • getSD

        public double[][] getSD()
        Returns the standard deviation of the data in each column of the input. Bias correction is applied to the variance if varianceCorrected is true.
        Returns:
        the standard deviation
      • getSkew

        public double[][] getSkew()
        Returns the skew of the data in each column of the input. Bias correction is applied to the variance if skewCorrected is true.
        Returns:
        the skew
      • getKurtosis

        public double[][] getKurtosis()
        Returns the kurtosis of the data in each column of the input. Bias correction is applied to the variance if kurtosisCorrected is true.
        Returns:
        the kurtosis
      • getMinimum

        public double[][] getMinimum()
        Returns the minimum value for each column of the data.
        Returns:
        the minimum
      • getMaximum

        public double[][] getMaximum()
        Returns the maximum value for each column of the data.
        Returns:
        the maximum
      • getGeometricMean

        public double[][] getGeometricMean()
        Returns the geometric mean for each column of the data.
        Returns:
        the geometric mean
      • getN

        public double[][] getN()
        Returns the number of data points for each column of the data. NaNs are excluded.
        Returns:
        the number of data points
      • getMedian

        public double[][] getMedian()
        Returns the median value for each column of the data.
        Returns:
        the median
      • getLower

        public double[][] getLower()
        Returns the lower pecentile for each column of the data.
        Returns:
        the lower pecentile
      • getUpper

        public double[][] getUpper()
        Returns the upper pecentile for each column of the data.
        Returns:
        the upper pecentile
      • getPercentile

        public double getPercentile()
        Returns the lower pecentile used. The upper percentile is (100-lower percentile)
        Returns:
        the pecentile
      • getSummary

        public double[][] getSummary()
        Returns a copy of the intermediate array used in calculations.
        Returns:
        a double[][]
      • isVarianceCorrected

        public boolean isVarianceCorrected()
        Returns true if bias correction is to be applied to the variance
        Returns:
        the correction flag
      • setVarianceCorrected

        public void setVarianceCorrected(boolean flag)
        Sets bias correction mode for the variance (and standard deviation)
        Parameters:
        flag -
      • isSkewCorrected

        public boolean isSkewCorrected()
        Returns true if bias correction is to be applied to the skew
        Returns:
        the correction flag
      • setSkewCorrected

        public void setSkewCorrected(boolean flag)
        Sets bias correction mode for the skew
        Parameters:
        flag -
      • isKurtosisCorrected

        public boolean isKurtosisCorrected()
        Returns true if bias correction is to be applied to the kurtosis
        Returns:
        the correction flag
      • setKurtosisCorrected

        public void setKurtosisCorrected(boolean flag)
        Sets bias correction mode for the kurtosis
        Parameters:
        flag -
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.