|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--weka.classifiers.functions.pace.Maths
Class for some utility mathematical or statistical functions.
Field Summary | |
static int |
chisqDistribution
Distribution type: chi-squared |
static double |
logPSI
The constant - log( sqrt(2 pi) ) |
static int |
normalDistribution
Distribution type: noraml |
static double |
PSI
The constant 1 / sqrt(2 pi) |
static int |
undefinedDistribution
Distribution type: undefined |
Constructor Summary | |
Maths()
|
Method Summary | |
static double |
dchisq(double x)
Returns the density of the Chi-squared distribution. |
static double |
dchisq(double x,
double ncp)
Returns the density of the noncentral Chi-squared distribution. |
static DoubleVector |
dchisq(double x,
DoubleVector ncp)
Returns the density of the noncentral Chi-squared distribution. |
static double |
dchisqLog(double x)
Returns the log-density of the noncentral Chi-square distribution. |
static double |
dchisqLog(double x,
double ncp)
Returns the log-density value of a noncentral Chi-square distribution. |
static DoubleVector |
dchisqLog(double x,
DoubleVector ncp)
Returns the log-density of a set of noncentral Chi-squared distributions. |
static double |
dnorm(double x)
Returns the density of the standard normal. |
static double |
dnorm(double x,
double mean,
double sd)
Returns the density value of a standard normal. |
static DoubleVector |
dnorm(double x,
DoubleVector mean,
double sd)
Returns the density values of a set of normal distributions with different means. |
static double |
dnormLog(double x)
Returns the log-density of the standard normal. |
static double |
dnormLog(double x,
double mean,
double sd)
Returns the log-density value of a standard normal. |
static DoubleVector |
dnormLog(double x,
DoubleVector mean,
double sd)
Returns the log-density values of a set of normal distributions with different means. |
static double |
hypot(double a,
double b)
sqrt(a^2 + b^2) without under/overflow. |
static double |
pchisq(double x)
Returns the cumulative probability of the Chi-squared distribution |
static double |
pchisq(double x,
double ncp)
Returns the cumulative probability of the noncentral Chi-squared distribution. |
static DoubleVector |
pchisq(double x,
DoubleVector ncp)
Returns the cumulative probability of a set of noncentral Chi-squared distributions. |
static double |
pnorm(double x)
Returns the cumulative probability of the standard normal. |
static double |
pnorm(double x,
double mean,
double sd)
Returns the cumulative probability of a normal distribution. |
static DoubleVector |
pnorm(double x,
DoubleVector mean,
double sd)
Returns the cumulative probability of a set of normal distributions with different means. |
static DoubleVector |
rchisq(int n,
double ncp,
java.util.Random random)
Generates a sample of a Chi-square distribution. |
static DoubleVector |
rnorm(int n,
double mean,
double sd,
java.util.Random random)
Generates a sample of a normal distribution. |
static double |
square(double x)
Returns the square of a value |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final double PSI
public static final double logPSI
public static final int undefinedDistribution
public static final int normalDistribution
public static final int chisqDistribution
Constructor Detail |
public Maths()
Method Detail |
public static double hypot(double a, double b)
public static double square(double x)
x
-
public static double pnorm(double x)
x
- the quantilepublic static double pnorm(double x, double mean, double sd)
x
- the quantilemean
- the mean of the normal distributionsd
- the standard deviation of the normal distribution.public static DoubleVector pnorm(double x, DoubleVector mean, double sd)
x
- the vector of quantilesmean
- the means of the normal distributionssd
- the standard deviation of the normal distribution.
public static double dnorm(double x)
x
- the quantile
public static double dnorm(double x, double mean, double sd)
x
- the quantilemean
- the mean of the normal distributionsd
- the standard deviation of the normal distribution.
public static DoubleVector dnorm(double x, DoubleVector mean, double sd)
x
- the quantilemean
- the means of the normal distributionssd
- the standard deviation of the normal distribution.
public static double dnormLog(double x)
x
- the quantile
public static double dnormLog(double x, double mean, double sd)
x
- the quantilemean
- the mean of the normal distributionsd
- the standard deviation of the normal distribution.
public static DoubleVector dnormLog(double x, DoubleVector mean, double sd)
x
- the quantilemean
- the means of the normal distributionssd
- the standard deviation of the normal distribution.
public static DoubleVector rnorm(int n, double mean, double sd, java.util.Random random)
n
- the size of the samplemean
- the mean of the normal distributionsd
- the standard deviation of the normal distribution.random
- the random stream
public static double pchisq(double x)
x
- the quantilepublic static double pchisq(double x, double ncp)
x
- the quantilencp
- the noncentral parameterpublic static DoubleVector pchisq(double x, DoubleVector ncp)
x
- the quantilencp
- the noncentral parameterspublic static double dchisq(double x)
x
- the quantile
public static double dchisq(double x, double ncp)
x
- the quantilencp
- the noncentral parameterpublic static DoubleVector dchisq(double x, DoubleVector ncp)
x
- the quantilencp
- the noncentral parameterspublic static double dchisqLog(double x)
x
- the quantile
public static double dchisqLog(double x, double ncp)
x
- the quantilencp
- the noncentral parameter
public static DoubleVector dchisqLog(double x, DoubleVector ncp)
x
- the quantilencp
- the noncentral parameterspublic static DoubleVector rchisq(int n, double ncp, java.util.Random random)
n
- the size of the samplencp
- the noncentral parameterrandom
- the random stream
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright (c) 2003 David Lindsay, Computer Learning Research Centre, Dept. Computer Science, Royal Holloway, University of London