Module to compute common statistical measure on array
Function or value | Description |
Full Usage:
cov array1 array2
Parameters:
^T array
-
The first input array.
array2 : ^T array
-
The second input array.
Returns: ^U
sample covariance estimator (Bessel's correction by N-1)
Modifiers: inline |
Returns NaN if data is empty or if any entry is NaN.
|
Full Usage:
covBy f array
Parameters:
'T -> ^a * ^a
-
A function applied to transform each element of the input array into a tuple of paired observations.
array : 'T array
-
The input array.
Returns: ^U
sample covariance estimator (Bessel's correction by N-1)
Modifiers: inline |
Computes the sample covariance of two random variables generated by applying a function to the input array. Returns NaN if data is empty or if any entry is NaN.
Example
|
Full Usage:
covOfPairs array
Parameters:
(^T * ^T) array
-
The input array.
Returns: ^U
sample covariance estimator (Bessel's correction by N-1)
Modifiers: inline |
Computes the sample covariance of two random variables. The covariance will be calculated between the paired observations. Returns NaN if data is empty or if any entry is NaN.
Example
|
Full Usage:
covPopulation array1 array2
Parameters:
^T array
-
The first input array.
array2 : ^T array
-
The second input array.
Returns: ^U
population covariance estimator (denominator N)
Modifiers: inline |
Returns NaN if data is empty or if any entry is NaN.
|
Full Usage:
covPopulationBy f array
Parameters:
'T -> ^a * ^a
-
A function applied to transform each element of the input array into a tuple of paired observations.
array : 'T array
-
The input array.
Returns: ^U
population covariance estimator (denominator N)
Modifiers: inline |
Computes the population covariance of two random variables generated by applying a function to the input array. Returns NaN if data is empty or if any entry is NaN.
Example
|
Full Usage:
covPopulationOfPairs array
Parameters:
(^T * ^T) array
-
The input array.
Returns: ^U
population covariance estimator (denominator N)
Modifiers: inline |
Computes the population covariance of two random variables. The covariance will be calculated between the paired observations. Returns NaN if data is empty or if any entry is NaN.
Example
|
Full Usage:
dropNaN array
Parameters:
float array
-
Returns: float[]
|
Example
|
Full Usage:
median items
Parameters:
^T array
-
Returns: ^T
Modifiers: inline Type parameters: ^T, ^b |
Example
|
Full Usage:
medianAbsoluteDev data
Parameters:
float[]
-
Returns: float
|
Example
|
Full Usage:
partitionSortInPlace left right items
Parameters:
int
-
right : int
-
items : 'T array
-
Returns: int
Modifiers: inline Type parameters: 'T |
Arranges the items between the left and right border, that all items left of the pivot element are smaller and bigger on the right.
Example
|
Full Usage:
quickSelect k items
Parameters:
int
-
items : 'T array
-
Returns: 'T
Modifiers: inline Type parameters: 'T |
Example
|
Full Usage:
quickSelectInPlace k items
Parameters:
int
-
items : 'T array
-
Returns: 'T
Modifiers: inline Type parameters: 'T |
Finds the kth smallest element in an unordered array (note that k is ONE-based)
Example
|
Full Usage:
quickSelectInPlaceWith left right k arr
Parameters:
int
-
right : int
-
k : int
-
arr : 'T array
-
Returns: 'T
Modifiers: inline Type parameters: 'T |
Finds the kth smallest element in an unordered array (note that k is ONE-based)
Example
|
|
|
Full Usage:
sampleWithOutReplacement rnd source k
Parameters:
Random
-
source : 'b array
-
k : int
-
Returns: 'b[]
|
Implementation according to: http://krkadev.blogspot.de/2010/08/random-numbers-without-repetition.html
Example
|
Full Usage:
sampleWithReplacement rnd source k
Parameters:
Random
-
source : 'a array
-
k : int
-
Returns: 'a[]
|
When we sample with replacement, the two sample values are independent.Practically, this means that what we get on the first one doesn't affect what we get on the second.Mathematically, this means that the covariance between the two is zero
Example
|
Full Usage:
seqInit from tto length
Parameters:
float
-
tto : float
-
length : int
-
Returns: float[]
|
Example
|
Full Usage:
shuffleFisherYates arr
Parameters:
'b[]
-
Returns: 'b[]
|
Example
|
Full Usage:
shuffleFisherYatesInPlace arr
Parameters:
'a[]
-
Returns: 'a[]
|
Example
|
Full Usage:
sort2InPlaceByKeys from count keys items
Parameters:
int
count : int
keys : 'T array
items : 'T array
|
|
Full Usage:
swapInPlace left right items
Parameters:
int
right : int
items : 'T array
Modifiers: inline Type parameters: 'T |
|
Full Usage:
varOf mean items
Parameters:
float
-
items : float array
-
Returns: float
Modifiers: inline |
Example
|
Full Usage:
weightedMean weights items
Parameters:
^T array
-
items : ^T array
-
Returns: ^d
Modifiers: inline Type parameters: ^T, ^c, ^d |
Example
|
Full Usage:
weightedVariance mean weights items
Parameters:
^c
-
weights : ^T array
-
items : ^T array
-
Returns: ^h
Modifiers: inline Type parameters: ^c, ^T, ^d, ^e, ^f, ^g, ^h |
Example
|