All Packages  Class Hierarchy  This Package  Previous  Next  Index  WEKA's home

Class weka.classifiers.functions.pace.Maths

java.lang.Object
    |
    +----weka.classifiers.functions.pace.Maths

public class Maths
extends java.lang.Object
Class for some utility mathematical or statistical functions.


Variable Index

 o chisqDistribution
Distribution type: chi-squared
 o logPSI
The constant - log( sqrt(2 pi) )
 o normalDistribution
Distribution type: noraml
 o PSI
The constant 1 / sqrt(2 pi)
 o undefinedDistribution
Distribution type: undefined

Constructor Index

 o Maths()
 

Method Index

 o dchisq(double)
Returns the density of the Chi-squared distribution.
 o dchisq(double, double)
Returns the density of the noncentral Chi-squared distribution.
 o dchisq(double, DoubleVector)
Returns the density of the noncentral Chi-squared distribution.
 o dchisqLog(double)
Returns the log-density of the noncentral Chi-square distribution.
 o dchisqLog(double, double)
Returns the log-density value of a noncentral Chi-square distribution.
 o dchisqLog(double, DoubleVector)
Returns the log-density of a set of noncentral Chi-squared distributions.
 o dnorm(double)
Returns the density of the standard normal.
 o dnorm(double, double, double)
Returns the density value of a standard normal.
 o dnorm(double, DoubleVector, double)
Returns the density values of a set of normal distributions with different means.
 o dnormLog(double)
Returns the log-density of the standard normal.
 o dnormLog(double, double, double)
Returns the log-density value of a standard normal.
 o dnormLog(double, DoubleVector, double)
Returns the log-density values of a set of normal distributions with different means.
 o hypot(double, double)
sqrt(a^2 + b^2) without under/overflow.
 o pchisq(double)
Returns the cumulative probability of the Chi-squared distribution
 o pchisq(double, double)
Returns the cumulative probability of the noncentral Chi-squared distribution.
 o pchisq(double, DoubleVector)
Returns the cumulative probability of a set of noncentral Chi-squared distributions.
 o pnorm(double)
Returns the cumulative probability of the standard normal.
 o pnorm(double, double, double)
Returns the cumulative probability of a normal distribution.
 o pnorm(double, DoubleVector, double)
Returns the cumulative probability of a set of normal distributions with different means.
 o rchisq(int, double, Random)
Generates a sample of a Chi-square distribution.
 o rnorm(int, double, double, Random)
Generates a sample of a normal distribution.
 o square(double)
Returns the square of a value

Field Detail

 o PSI
public static final double PSI
          The constant 1 / sqrt(2 pi)
 o logPSI
public static final double logPSI
          The constant - log( sqrt(2 pi) )
 o undefinedDistribution
public static final int undefinedDistribution
          Distribution type: undefined
 o normalDistribution
public static final int normalDistribution
          Distribution type: noraml
 o chisqDistribution
public static final int chisqDistribution
          Distribution type: chi-squared

Constructor Detail

 o Maths
public Maths()

Method Detail

 o hypot
public static double hypot(double a,
                           double b)
          sqrt(a^2 + b^2) without under/overflow.
 o square
public static double square(double x)
          Returns the square of a value
Parameters:
x -
Returns:
the square
 o pnorm
public static double pnorm(double x)
          Returns the cumulative probability of the standard normal.
Parameters:
x - the quantile
 o pnorm
public static double pnorm(double x,
                           double mean,
                           double sd)
          Returns the cumulative probability of a normal distribution.
Parameters:
x - the quantile
mean - the mean of the normal distribution
sd - the standard deviation of the normal distribution.
 o pnorm
public static DoubleVector pnorm(double x,
                                 DoubleVector mean,
                                 double sd)
          Returns the cumulative probability of a set of normal distributions with different means.
Parameters:
x - the vector of quantiles
mean - the means of the normal distributions
sd - the standard deviation of the normal distribution.
Returns:
the cumulative probability
 o dnorm
public static double dnorm(double x)
          Returns the density of the standard normal.
Parameters:
x - the quantile
Returns:
the density
 o dnorm
public static double dnorm(double x,
                           double mean,
                           double sd)
          Returns the density value of a standard normal.
Parameters:
x - the quantile
mean - the mean of the normal distribution
sd - the standard deviation of the normal distribution.
Returns:
the density
 o dnorm
public static DoubleVector dnorm(double x,
                                 DoubleVector mean,
                                 double sd)
          Returns the density values of a set of normal distributions with different means.
Parameters:
x - the quantile
mean - the means of the normal distributions
sd - the standard deviation of the normal distribution.
Returns:
the density
 o dnormLog
public static double dnormLog(double x)
          Returns the log-density of the standard normal.
Parameters:
x - the quantile
Returns:
the density
 o dnormLog
public static double dnormLog(double x,
                              double mean,
                              double sd)
          Returns the log-density value of a standard normal.
Parameters:
x - the quantile
mean - the mean of the normal distribution
sd - the standard deviation of the normal distribution.
Returns:
the density
 o dnormLog
public static DoubleVector dnormLog(double x,
                                    DoubleVector mean,
                                    double sd)
          Returns the log-density values of a set of normal distributions with different means.
Parameters:
x - the quantile
mean - the means of the normal distributions
sd - the standard deviation of the normal distribution.
Returns:
the density
 o rnorm
public static DoubleVector rnorm(int n,
                                 double mean,
                                 double sd,
                                 java.util.Random random)
          Generates a sample of a normal distribution.
Parameters:
n - the size of the sample
mean - the mean of the normal distribution
sd - the standard deviation of the normal distribution.
random - the random stream
Returns:
the sample
 o pchisq
public static double pchisq(double x)
          Returns the cumulative probability of the Chi-squared distribution
Parameters:
x - the quantile
 o pchisq
public static double pchisq(double x,
                            double ncp)
          Returns the cumulative probability of the noncentral Chi-squared distribution.
Parameters:
x - the quantile
ncp - the noncentral parameter
 o pchisq
public static DoubleVector pchisq(double x,
                                  DoubleVector ncp)
          Returns the cumulative probability of a set of noncentral Chi-squared distributions.
Parameters:
x - the quantile
ncp - the noncentral parameters
 o dchisq
public static double dchisq(double x)
          Returns the density of the Chi-squared distribution.
Parameters:
x - the quantile
Returns:
the density
 o dchisq
public static double dchisq(double x,
                            double ncp)
          Returns the density of the noncentral Chi-squared distribution.
Parameters:
x - the quantile
ncp - the noncentral parameter
 o dchisq
public static DoubleVector dchisq(double x,
                                  DoubleVector ncp)
          Returns the density of the noncentral Chi-squared distribution.
Parameters:
x - the quantile
ncp - the noncentral parameters
 o dchisqLog
public static double dchisqLog(double x)
          Returns the log-density of the noncentral Chi-square distribution.
Parameters:
x - the quantile
Returns:
the density
 o dchisqLog
public static double dchisqLog(double x,
                               double ncp)
          Returns the log-density value of a noncentral Chi-square distribution.
Parameters:
x - the quantile
ncp - the noncentral parameter
Returns:
the density
 o dchisqLog
public static DoubleVector dchisqLog(double x,
                                     DoubleVector ncp)
          Returns the log-density of a set of noncentral Chi-squared distributions.
Parameters:
x - the quantile
ncp - the noncentral parameters
 o rchisq
public static DoubleVector rchisq(int n,
                                  double ncp,
                                  java.util.Random random)
          Generates a sample of a Chi-square distribution.
Parameters:
n - the size of the sample
ncp - the noncentral parameter
random - the random stream
Returns:
the sample

All Packages  Class Hierarchy  This Package  Previous  Next  Index  WEKA's home