MathematicsFunctions
in package
Class MathematicsManager
Tags
Table of Contents
Methods
- AlmeidaDistance() : float
- Distance between two oligonucleotide frequency tables, based on a modified Pearson correlation (Almeida et al, 2001) http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=pubmed&dopt=Abstract&list_uids=11331237
- EuclideanDistance() : float
- Euclidean distance between two oligonucleotide frequency tables, scaled by the table size (Wang et al, Gene 2005; 346:173-185)
- Mean() : float|int
- Calculates the mean, the null entries left out
- Median() : float|int
- Calculates the median, the null entries left out
- PearsonDistance() : float
- Pearson distance (1 - r) between two series of values sharing the same keys. A correlation that only differs from 1 by rounding noise is taken as exactly 1, so identical series give 0.
- Variance() : float|int
- Calculates the variance (sample variance, n - 1), the null entries left out
- unroundedMean() : float|int
- The mean of the values, the null entries left out, unrounded
Methods
AlmeidaDistance()
Distance between two oligonucleotide frequency tables, based on a modified Pearson correlation (Almeida et al, 2001) http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=pubmed&dopt=Abstract&list_uids=11331237
public
static AlmeidaDistance(array<string|int, mixed> $aValsX, array<string|int, mixed> $aValsY) : float
Parameters
- $aValsX : array<string|int, mixed>
-
Values for X
- $aValsY : array<string|int, mixed>
-
Values for Y, indexed like $aValsX
Tags
Return values
floatEuclideanDistance()
Euclidean distance between two oligonucleotide frequency tables, scaled by the table size (Wang et al, Gene 2005; 346:173-185)
public
static EuclideanDistance(array<string|int, mixed> $aValsX, array<string|int, mixed> $aValsY, int $iOligoLen) : float
Parameters
- $aValsX : array<string|int, mixed>
-
Frequencies of the first sequence, by oligonucleotide
- $aValsY : array<string|int, mixed>
-
Frequencies of the second sequence, by oligonucleotide
- $iOligoLen : int
-
Length of the oligonucleotides
Return values
floatMean()
Calculates the mean, the null entries left out
public
static Mean(array<string|int, mixed> $data[, int|null $iPrecision = 3 ]) : float|int
Parameters
- $data : array<string|int, mixed>
- $iPrecision : int|null = 3
-
Decimals the result is rounded to, 3 by default (the historical behaviour). Null returns it unrounded : a mean of frequencies or skews, of the order of 1e-4, is rounded to 0 by the default.
Tags
Return values
float|intMedian()
Calculates the median, the null entries left out
public
static Median(array<string|int, mixed> $data) : float|int
Parameters
- $data : array<string|int, mixed>
Tags
Return values
float|intPearsonDistance()
Pearson distance (1 - r) between two series of values sharing the same keys. A correlation that only differs from 1 by rounding noise is taken as exactly 1, so identical series give 0.
public
static PearsonDistance(array<string|int, mixed> $aValsX, array<string|int, mixed> $aValsY) : float
Parameters
- $aValsX : array<string|int, mixed>
-
Values for X
- $aValsY : array<string|int, mixed>
-
Values for Y, indexed like $aValsX
Tags
Return values
floatVariance()
Calculates the variance (sample variance, n - 1), the null entries left out
public
static Variance(array<string|int, mixed> $data[, int|null $iPrecision = 3 ]) : float|int
Parameters
- $data : array<string|int, mixed>
- $iPrecision : int|null = 3
-
Decimals the result is rounded to, 3 by default (the historical behaviour). Null returns it unrounded : the variance of frequencies, of the order of 1e-6, is rounded to 0 by the default.
Tags
Return values
float|intunroundedMean()
The mean of the values, the null entries left out, unrounded
private
static unroundedMean(array<string|int, mixed> $data) : float|int
Parameters
- $data : array<string|int, mixed>