edu.jhu.bme.smile.commons.math
Class StatisticsDouble

java.lang.Object
  extended by edu.jhu.bme.smile.commons.math.StatisticsDouble

public class StatisticsDouble
extends java.lang.Object


Constructor Summary
StatisticsDouble()
           
 
Method Summary
static java.lang.String hist2string(double[][] hist)
           
static double[][] histogram(double[] x, double[] bins)
          Computes the histogram using the specified bins The first column of the output array is the lower bounds for each bin The second column of the output array is the count in that bin.
static double[][] histogram(double[] x, int bins)
          Computes the histogram using equally spaced bins.
static double[][] jointhistogram(double[] x, double[] y, int bins)
          Computes the joint histogram using equally spaced bins.
static double KLdivergence(double[] x, double[] y, int binnum)
          Computes the Kullbach-Liebler divergence between two data sets x and y
static double logRicianPDF(double[] mu, double[] sigma, double[] x)
           
static void main(java.lang.String[] args)
           
static double max(double[] x)
           
static double mean(double[] x)
           
static double median(double[] x)
           
static double medianRobust(double[] x)
           
static double min(double[] x)
           
static double[][] normalizeHistogram(double[][] hist)
           
static double[][] normalizeJointHistogram(double[][] hist)
           
static double product(double[] x)
           
static double Qn(double[] x)
           
static double QnRobust(double[] x)
           
static double[] robustLogRicianPDF(double[] mu, double[] sigma, double[] x, double[] result)
           
static double square(double x)
           
static double std(double[] x)
           
static double sum(double[] x)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StatisticsDouble

public StatisticsDouble()
Method Detail

sum

public static double sum(double[] x)

product

public static double product(double[] x)

mean

public static double mean(double[] x)

square

public static double square(double x)

std

public static double std(double[] x)

median

public static double median(double[] x)

medianRobust

public static double medianRobust(double[] x)

histogram

public static double[][] histogram(double[] x,
                                   int bins)
Computes the histogram using equally spaced bins. The first column of the output array is the lower bounds for each bin The second column of the output array is the count in that bin.

Parameters:
x - - the input data
bins - - the number of bins to use
Returns:
the output

jointhistogram

public static double[][] jointhistogram(double[] x,
                                        double[] y,
                                        int bins)
Computes the joint histogram using equally spaced bins. The first row of the output array is the lower bounds for each bin The second row of the output array is the count in that bin.

Parameters:
x - - the input data
bins - - the number of bins to use
Returns:
the output

histogram

public static double[][] histogram(double[] x,
                                   double[] bins)
Computes the histogram using the specified bins The first column of the output array is the lower bounds for each bin The second column of the output array is the count in that bin.

Parameters:
x - - the input data
bins - - the array of bins
Returns:
the output

normalizeHistogram

public static double[][] normalizeHistogram(double[][] hist)

normalizeJointHistogram

public static double[][] normalizeJointHistogram(double[][] hist)

KLdivergence

public static double KLdivergence(double[] x,
                                  double[] y,
                                  int binnum)
Computes the Kullbach-Liebler divergence between two data sets x and y

Parameters:
x - - input data
y - - input data 2
Returns:
the KL divergence

hist2string

public static java.lang.String hist2string(double[][] hist)

QnRobust

public static double QnRobust(double[] x)

max

public static double max(double[] x)

min

public static double min(double[] x)

Qn

public static double Qn(double[] x)

logRicianPDF

public static double logRicianPDF(double[] mu,
                                  double[] sigma,
                                  double[] x)

robustLogRicianPDF

public static double[] robustLogRicianPDF(double[] mu,
                                          double[] sigma,
                                          double[] x,
                                          double[] result)

main

public static void main(java.lang.String[] args)