Public Member Functions | Static Public Member Functions | Static Protected Member Functions

CStatistics Class Reference


Detailed Description

Class that contains certain functions related to statistics, such as the student's t distribution.

Definition at line 27 of file Statistics.h.

Inheritance diagram for CStatistics:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual const char * get_name () const

Static Public Member Functions

static float64_t mean (SGVector< float64_t > values)
static float64_t variance (SGVector< float64_t > values)
static float64_t std_deviation (SGVector< float64_t > values)
static float64_t confidence_intervals_mean (SGVector< float64_t > values, float64_t alpha, float64_t &conf_int_low, float64_t &conf_int_up)
static float64_t student_t_distribution (int32_t k, float64_t t)
static float64_t inverse_student_t_distribution (int32_t k, float64_t p)
static float64_t incomplete_beta (float64_t a, float64_t b, float64_t x)
static float64_t inverse_incomplete_beta (float64_t a, float64_t b, float64_t y)
static float64_t inverse_normal_distribution (float64_t y0)

Static Protected Member Functions

static float64_t ibetaf_incomplete_beta_ps (float64_t a, float64_t b, float64_t x, float64_t maxgam)
static float64_t ibetaf_incomplete_beta_fe (float64_t a, float64_t b, float64_t x, float64_t big, float64_t biginv)
static float64_t ibetaf_incomplete_beta_fe2 (float64_t a, float64_t b, float64_t x, float64_t big, float64_t biginv)

Member Function Documentation

float64_t confidence_intervals_mean ( SGVector< float64_t values,
float64_t  alpha,
float64_t conf_int_low,
float64_t conf_int_up 
) [static]

Calculates the sample mean of a given set of samples and also computes the confidence interval for the actual mean for a given p-value, asuming that the actual variance and mean are unknown (These are estimated by the samples)

Only for normally distributed data

Parameters:
values vector of values that are used for calculations
alpha actual mean lies in confidence interval with (1-alpha)*100%
conf_int_low lower confidence interval border is written here
conf_int_up upper confidence interval border is written here
Returns:
sample mean

Definition at line 52 of file Statistics.cpp.

virtual const char* get_name (  )  const [virtual]
Returns:
object name

Implements CSGObject.

Definition at line 135 of file Statistics.h.

float64_t ibetaf_incomplete_beta_fe ( float64_t  a,
float64_t  b,
float64_t  x,
float64_t  big,
float64_t  biginv 
) [static, protected]

Continued fraction expansion #1 for incomplete beta integral

Taken from ALGLIB under GPL2+

Definition at line 435 of file Statistics.cpp.

float64_t ibetaf_incomplete_beta_fe2 ( float64_t  a,
float64_t  b,
float64_t  x,
float64_t  big,
float64_t  biginv 
) [static, protected]

Continued fraction expansion #2 for incomplete beta integral

Taken from ALGLIB under GPL2+

Definition at line 331 of file Statistics.cpp.

float64_t ibetaf_incomplete_beta_ps ( float64_t  a,
float64_t  b,
float64_t  x,
float64_t  maxgam 
) [static, protected]

Power series for incomplete beta integral. Use when b*x is small and x not too close to 1.

Taken from ALGLIB under GPL2+

Definition at line 278 of file Statistics.cpp.

float64_t incomplete_beta ( float64_t  a,
float64_t  b,
float64_t  x 
) [static]

Incomplete beta integral Returns incomplete beta integral of the arguments, evaluated from zero to x. The domain of definition is 0 <= x <= 1. In this implementation a and b are restricted to positive values. The integral is evaluated by a continued fraction expansion or, when b*x is small, by a power series.

Taken from ALGLIB under GPL2+

Definition at line 154 of file Statistics.cpp.

float64_t inverse_incomplete_beta ( float64_t  a,
float64_t  b,
float64_t  y 
) [static]

Inverse of imcomplete beta integral Given y, the function finds x such that inverse_incomplete_beta(a, b, x) = y . The routine performs interval halving or Newton iterations to find the root of inverse_incomplete_beta(a, b, x)-y=0.

Taken from ALGLIB under GPL2+

Definition at line 581 of file Statistics.cpp.

float64_t inverse_normal_distribution ( float64_t  y0  )  [static]

Inverse of Normal distribution function Returns the argument, x, for which the area under the Gaussian probability density function (integrated from minus infinity to x) is equal to y.

For small arguments 0 < y < exp(-2), the program computes z=sqrt(-2.0*log(y)) then the approximation is x=z-log(z)/z-(1/z)P(1/z)/Q(1/z). There are two rational functions P/Q, one for 0 < y < exp(-32) and the other for y up to exp(-2). For larger arguments, w = y - 0.5, and x/sqrt(2pi) = w + w**3 R(w**2)/S(w**2)).

Taken from ALGLIB under GPL2+

Definition at line 1029 of file Statistics.cpp.

float64_t inverse_student_t_distribution ( int32_t  k,
float64_t  p 
) [static]

Functional inverse of Student's t distribution Given probability p, finds the argument t such that stdtr(k,t) is equal to p.

Taken from ALGLIB under GPL2+

Definition at line 537 of file Statistics.cpp.

float64_t mean ( SGVector< float64_t values  )  [static]

Calculates mean of given values

Parameters:
values vector of values
Returns:
variance of given values

Definition at line 21 of file Statistics.cpp.

float64_t std_deviation ( SGVector< float64_t values  )  [static]

Calculates standard deviation of given values

Parameters:
values vector of values
Returns:
standard deviation of given values

Definition at line 47 of file Statistics.cpp.

float64_t student_t_distribution ( int32_t  k,
float64_t  t 
) [static]

Student's t distribution Computes the integral from minus infinity to t of the Student For t < -2, this is the method of computation. For higher t, a direct method is derived from integration by parts. Since the function is symmetric about t=0, the area under the right tail of the density is found by calling the function with -t instead of t. Taken from ALGLIB under GPL2+

Parameters:
k degrees of freedom
t integral is computed from minus infinity to t
Returns:
described integral

Definition at line 79 of file Statistics.cpp.

float64_t variance ( SGVector< float64_t values  )  [static]

Calculates variance of given values

Parameters:
values vector of values
Returns:
variance of given values

Definition at line 33 of file Statistics.cpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

SHOGUN Machine Learning Toolbox - Documentation