C# Class Accord.Statistics.Tools

Set of statistics functions
This class represents collection of functions used in statistics. Every Matrix function assumes data is organized in a table-like model, where Columns represents variables and Rows represents a observation of each variable.
Mostrar archivo Open project: accord-net/framework Class Usage Examples

Public Methods

Method Description
Center ( this matrix, bool inPlace = false ) : ].double[

Centers column data, subtracting the empirical mean from each variable.

Center ( this matrix, double means, bool inPlace = false ) : ].double[

Centers column data, subtracting the empirical mean from each variable.

Center ( this observation, double result = null ) : double[]

Centers an observation, subtracting the empirical mean from each element in the observation vector.

Center ( this values, double mean, double result = null ) : double[]

Centers an observation, subtracting the empirical mean from each element in the observation vector.

Center ( this matrix, bool inPlace = false ) : double[][]

Centers column data, subtracting the empirical mean from each variable.

Center ( this matrix, double means, bool inPlace = false ) : double[][]

Centers column data, subtracting the empirical mean from each variable.

Distance ( this kernel, double x, double y ) : double

Computes the kernel distance for a kernel function even if it doesn't implement the Accord.Math.Distances.IDistance interface. Can be used to check the proper implementation of the distance function.

InnerFence ( this quartiles ) : DoubleRange

Creates Tukey's box plot inner fence.

OuterFence ( this quartiles ) : DoubleRange

Creates Tukey's box plot outer fence.

RandomCovariance ( int size, double minValue, double maxValue ) : ].double[

Generates a random Measures.Covariance(double[], double[], bool) matrix.

Rank ( this samples, bool alreadySorted = false ) : double[]

Gets the rank of a sample, often used with order statistics.

SplitInformation ( int samples, int partitions ) : double

Computes the split information measure.

Standardize ( this matrix, bool inPlace = false ) : ].double[

Standardizes column data, removing the empirical standard deviation from each variable.

This method does not remove the empirical mean prior to execution.

Standardize ( this matrix, double standardDeviations, bool inPlace = false, double tol = 1e-12 ) : ].double[

Standardizes column data, removing the empirical standard deviation from each variable.

This method does not remove the empirical mean prior to execution.

Standardize ( this values, bool inPlace = false ) : double[]

Standardizes column data, removing the empirical standard deviation from each variable.

This method does not remove the empirical mean prior to execution.

Standardize ( this values, double standardDeviation, bool inPlace = false ) : double[]

Standardizes column data, removing the empirical standard deviation from each variable.

This method does not remove the empirical mean prior to execution.

Standardize ( this matrix, bool inPlace = false ) : double[][]

Standardizes column data, removing the empirical standard deviation from each variable.

This method does not remove the empirical mean prior to execution.

Standardize ( this matrix, double standardDeviations, bool inPlace = false, double tol = 1e-12 ) : double[][]

Standardizes column data, removing the empirical standard deviation from each variable.

This method does not remove the empirical mean prior to execution.

ZScores ( this matrix ) : ].double[

Generates the Standard Scores, also known as Z-Scores, from the given data.

ZScores ( this matrix, double means, double standardDeviations ) : ].double[

Generates the Standard Scores, also known as Z-Scores, from the given data.

ZScores ( this matrix ) : double[][]

Generates the Standard Scores, also known as Z-Scores, from the given data.

ZScores ( this matrix, double means, double standardDeviations ) : double[][]

Generates the Standard Scores, also known as Z-Scores, from the given data.

Method Details

Center() public static method

Centers column data, subtracting the empirical mean from each variable.
public static Center ( this matrix, bool inPlace = false ) : ].double[
matrix this A matrix where each column represent a variable and each row represent a observation.
inPlace bool True to perform the operation in place, altering the original input matrix.
return ].double[

Center() public static method

Centers column data, subtracting the empirical mean from each variable.
public static Center ( this matrix, double means, bool inPlace = false ) : ].double[
matrix this A matrix where each column represent a variable and each row represent a observation.
means double The mean value of the given values, if already known.
inPlace bool True to perform the operation in place, altering the original input matrix.
return ].double[

Center() public static method

Centers an observation, subtracting the empirical mean from each element in the observation vector.
public static Center ( this observation, double result = null ) : double[]
observation this An array of double precision floating-point numbers.
result double The destination array where the result of this operation should be stored.
return double[]

Center() public static method

Centers an observation, subtracting the empirical mean from each element in the observation vector.
public static Center ( this values, double mean, double result = null ) : double[]
values this An array of double precision floating-point numbers.
mean double The mean of the , if already known.
result double The destination array where the result of this operation should be stored.
return double[]

Center() public static method

Centers column data, subtracting the empirical mean from each variable.
public static Center ( this matrix, bool inPlace = false ) : double[][]
matrix this A matrix where each column represent a variable and each row represent a observation.
inPlace bool True to perform the operation in place, altering the original input matrix.
return double[][]

Center() public static method

Centers column data, subtracting the empirical mean from each variable.
public static Center ( this matrix, double means, bool inPlace = false ) : double[][]
matrix this A matrix where each column represent a variable and each row represent a observation.
means double The mean value of the given values, if already known.
inPlace bool True to perform the operation in place, altering the original input matrix.
return double[][]

Distance() public static method

Computes the kernel distance for a kernel function even if it doesn't implement the Accord.Math.Distances.IDistance interface. Can be used to check the proper implementation of the distance function.
public static Distance ( this kernel, double x, double y ) : double
kernel this The kernel function whose distance needs to be evaluated.
x double An input point x given in input space.
y double An input point y given in input space.
return double

InnerFence() public static method

Creates Tukey's box plot inner fence.
public static InnerFence ( this quartiles ) : DoubleRange
quartiles this
return AForge.DoubleRange

OuterFence() public static method

Creates Tukey's box plot outer fence.
public static OuterFence ( this quartiles ) : DoubleRange
quartiles this
return AForge.DoubleRange

RandomCovariance() public static method

Generates a random Measures.Covariance(double[], double[], bool) matrix.
public static RandomCovariance ( int size, double minValue, double maxValue ) : ].double[
size int The size of the square matrix.
minValue double The minimum value for a diagonal element.
maxValue double The maximum size for a diagonal element.
return ].double[

Rank() public static method

Gets the rank of a sample, often used with order statistics.
public static Rank ( this samples, bool alreadySorted = false ) : double[]
samples this
alreadySorted bool
return double[]

SplitInformation() public static method

Computes the split information measure.
public static SplitInformation ( int samples, int partitions ) : double
samples int The total number of samples.
partitions int The partitioning.
return double

Standardize() public static method

Standardizes column data, removing the empirical standard deviation from each variable.
This method does not remove the empirical mean prior to execution.
public static Standardize ( this matrix, bool inPlace = false ) : ].double[
matrix this A matrix where each column represent a variable and each row represent a observation.
inPlace bool True to perform the operation in place, altering the original input matrix.
return ].double[

Standardize() public static method

Standardizes column data, removing the empirical standard deviation from each variable.
This method does not remove the empirical mean prior to execution.
public static Standardize ( this matrix, double standardDeviations, bool inPlace = false, double tol = 1e-12 ) : ].double[
matrix this A matrix where each column represent a variable and each row represent a observation.
standardDeviations double The values' standard deviation vector, if already known.
inPlace bool True to perform the operation in place, altering the original input matrix.
tol double The minimum value that will be taken as the standard deviation in case the deviation is too close to zero.
return ].double[

Standardize() public static method

Standardizes column data, removing the empirical standard deviation from each variable.
This method does not remove the empirical mean prior to execution.
public static Standardize ( this values, bool inPlace = false ) : double[]
values this An array of double precision floating-point numbers.
inPlace bool True to perform the operation in place, /// altering the original input matrix.
return double[]

Standardize() public static method

Standardizes column data, removing the empirical standard deviation from each variable.
This method does not remove the empirical mean prior to execution.
public static Standardize ( this values, double standardDeviation, bool inPlace = false ) : double[]
values this An array of double precision floating-point numbers.
standardDeviation double The standard deviation of the given /// , if already known.
inPlace bool True to perform the operation in place, altering the original input matrix.
return double[]

Standardize() public static method

Standardizes column data, removing the empirical standard deviation from each variable.
This method does not remove the empirical mean prior to execution.
public static Standardize ( this matrix, bool inPlace = false ) : double[][]
matrix this A matrix where each column represent a variable and each row represent a observation.
inPlace bool True to perform the operation in place, altering the original input matrix.
return double[][]

Standardize() public static method

Standardizes column data, removing the empirical standard deviation from each variable.
This method does not remove the empirical mean prior to execution.
public static Standardize ( this matrix, double standardDeviations, bool inPlace = false, double tol = 1e-12 ) : double[][]
matrix this A matrix where each column represent a variable and each row represent a observation.
standardDeviations double The values' standard deviation vector, if already known.
inPlace bool True to perform the operation in place, altering the original input matrix.
tol double The minimum value that will be taken as the standard deviation in case the deviation is too close to zero.
return double[][]

ZScores() public static method

Generates the Standard Scores, also known as Z-Scores, from the given data.
public static ZScores ( this matrix ) : ].double[
matrix this A number multi-dimensional array containing the matrix values.
return ].double[

ZScores() public static method

Generates the Standard Scores, also known as Z-Scores, from the given data.
public static ZScores ( this matrix, double means, double standardDeviations ) : ].double[
matrix this A number multi-dimensional array containing the matrix values.
means double The mean value of the given values, if already known.
standardDeviations double The values' standard deviation vector, if already known.
return ].double[

ZScores() public static method

Generates the Standard Scores, also known as Z-Scores, from the given data.
public static ZScores ( this matrix ) : double[][]
matrix this A number multi-dimensional array containing the matrix values.
return double[][]

ZScores() public static method

Generates the Standard Scores, also known as Z-Scores, from the given data.
public static ZScores ( this matrix, double means, double standardDeviations ) : double[][]
matrix this A number multi-dimensional array containing the matrix values.
means double The mean value of the given values, if already known.
standardDeviations double The values' standard deviation vector, if already known.
return double[][]