Seq Module
Contains correlation functions optimized for sequences
Functions and values
| Function or value | Description |
Full Usage:
Seq.bicor seq1 seq2
Parameters:
float seq
-
seq2 : float seq
-
Returns: float
|
|
Full Usage:
Seq.bicorBy f seq
Parameters:
'T -> float * float
-
A function applied to transform each element of the sequence into a tuple of paired observations.
seq : 'T seq
-
The input sequence.
Returns: float
The Biweighted Midcorrelation.
Modifiers: inline Type parameters: 'T |
Calculates the bicor correlation of two samples. The two samples are built by applying the given function to each element of the sequence. The function should transform each sequence element into a tuple of paired observations from the two samples. The correlation will be calculated between the paired observations.
Example
val ab: {| A: float; B: float |} list
anonymous record field A: float
anonymous record field B: float
module Seq
from Microsoft.FSharp.Collections
|
Full Usage:
Seq.bicorOfPairs seq
Parameters:
(float * float) seq
-
The input sequence.
Returns: float
The Biweighted Midcorrelation.
Modifiers: inline |
Example
val xy: (float * float) list
module Seq
from Microsoft.FSharp.Collections
|
Full Usage:
Seq.kendall seq1 seq2
Parameters:
'a seq
-
The first sequence of observations.
seq2 : 'b seq
-
The second sequence of observations.
Returns: float
Kendall Tau-b rank correlation coefficient of seq1 and seq2
|
This is an alias to kendallTauB. Computes Kendall Tau-b rank correlation coefficient between two sequences of observations. Tau-b is used to adjust for ties. tau_b = (n_c - n_d) / sqrt((n_0 - n_1) * (n_0 - n_2)), where
Example
val x: float list
val y: float list
module Seq
from Microsoft.FSharp.Collections
|
Full Usage:
Seq.kendallBy f seq
Parameters:
'T -> 'a * 'a
-
A function applied to transform each element of the sequence into a tuple of paired observations.
seq : 'T seq
-
The input sequence.
Returns: float
The kendall correlation coefficient.
Modifiers: inline Type parameters: 'T, 'a |
Calculates the kendall correlation of two samples. The two samples are built by applying the given function to each element of the sequence. The function should transform each sequence element into a tuple of paired observations from the two samples. The correlation will be calculated between the paired observations.
Example
val ab: {| A: float; B: float |} list
anonymous record field A: float
anonymous record field B: float
module Seq
from Microsoft.FSharp.Collections
|
Full Usage:
Seq.kendallOfPairs seq
Parameters:
('T * 'T) seq
-
The input sequence.
Returns: float
The kendall correlation coefficient.
Modifiers: inline Type parameters: 'T |
Example
val xy: (float * float) list
module Seq
from Microsoft.FSharp.Collections
|
Full Usage:
Seq.kendallTauA seq1 seq2
Parameters:
'a seq
-
The first sequence of observations.
seq2 : 'b seq
-
The second sequence of observations.
Returns: float
Kendall Tau-a rank correlation coefficient of setA and setB
|
Computes Kendall Tau-a rank correlation coefficient between two sequences of observations. No adjustment is made for ties. tau_a = (n_c - n_d) / n_0, where
Example
val x: float list
val y: float list
module Seq
from Microsoft.FSharp.Collections
|
Full Usage:
Seq.kendallTauB seq1 seq2
Parameters:
'a seq
-
The first sequence of observations.
seq2 : 'b seq
-
The second sequence of observations.
Returns: float
Kendall Tau-b rank correlation coefficient of seq1 and seq2
|
Computes Kendall Tau-b rank correlation coefficient between two sequences of observations. Tau-b is used to adjust for ties. tau_b = (n_c - n_d) / sqrt((n_0 - n_1) * (n_0 - n_2)), where
Example
val x: float list
val y: float list
module Seq
from Microsoft.FSharp.Collections
|
Full Usage:
Seq.kendallTauC seq1 seq2
Parameters:
'a seq
-
The first sequence of observations.
seq2 : 'b seq
-
The second sequence of observations.
Returns: float
Kendall Tau-c rank correlation coefficient of seq1 and seq2
|
Computes Kendall Tau-c rank correlation coefficient between two sequences of observations. Tau-c is used to adjust for ties which is preferred to Tau-b when x and y have a different number of possible values. tau_c = 2(n_c - n_d) / (n^2 * (m-1)/m), where
Example
val x: int list
val y: int list
module Seq
from Microsoft.FSharp.Collections
|
Full Usage:
Seq.pearson seq1 seq2
Parameters:
^T seq
-
seq2 : ^T seq
-
Returns: float
Modifiers: inline Type parameters: ^T |
|
Full Usage:
Seq.pearsonBy f seq
Parameters:
'T -> ^a * ^a
-
A function applied to transform each element of the sequence into a tuple of paired observations.
seq : 'T seq
-
The input sequence.
Returns: float
The pearson correlation.
Modifiers: inline Type parameters: 'T, ^a |
Calculates the pearson correlation of two samples. The two samples are built by applying the given function to each element of the sequence. The function should transform each sequence element into a tuple of paired observations from the two samples. The correlation will be calculated between the paired observations.
Example
val ab: {| A: float; B: float |} list
anonymous record field A: float
anonymous record field B: float
module Seq
from Microsoft.FSharp.Collections
|
Full Usage:
Seq.pearsonOfPairs seq
Parameters:
(^T * ^T) seq
-
The input sequence.
Returns: float
The pearson correlation.
Modifiers: inline Type parameters: ^T |
Example
val xy: (float * float) list
module Seq
from Microsoft.FSharp.Collections
|
Full Usage:
Seq.pearsonWeighted seq1 seq2 weights
Parameters:
^T seq
-
seq2 : ^T seq
-
weights : ^T seq
-
Returns: float
Modifiers: inline Type parameters: ^T, ^a |
|
Full Usage:
Seq.pearsonWeightedBy f seq
Parameters:
'T -> ^a * ^a * ^a
-
A function applied to transform each element of the sequence into a tuple of triples representing the two samples and the weight. If the two samples are x and y then the elements of the sequence should be triples of x * y * weight
seq : 'T seq
-
The input sequence.
Returns: float
The weighted pearson correlation.
Modifiers: inline Type parameters: 'T, ^a, ^b |
Example
val abw: {| A: float; B: float; W: float |} list
anonymous record field A: float
anonymous record field B: float
anonymous record field W: float
|
Full Usage:
Seq.pearsonWeightedOfTriples seq
Parameters:
(^T * ^T * ^T) seq
-
The input sequence.
Returns: float
The weighted pearson correlation.
Modifiers: inline Type parameters: ^T, ^a |
Example
val xyw: (float * float * float) list
module Seq
from Microsoft.FSharp.Collections
|
Full Usage:
Seq.spearman seq1 seq2
Parameters:
^T seq
seq2 : ^T seq
Returns: float
The spearman correlation.
Modifiers: inline Type parameters: ^T |
Spearman Correlation (with ranks) Items that are tied are each allocated the average of the ranks that they would have had had they been distinguishable. Reference: Williams R.B.G. (1986) Spearman’s and Kendall’s Coefficients of Rank Correlation. Intermediate Statistics for Geographers and Earth Scientists, p453, https://doi.org/10.1007/978-1-349-06813-5_6
Example
val x: float list
val y: float list
module Seq
from Microsoft.FSharp.Collections
|
Full Usage:
Seq.spearmanBy f seq
Parameters:
'T -> ^a * ^a
-
A function applied to transform each element of the sequence into a tuple of paired observations.
seq : 'T seq
-
The input sequence.
Returns: float
The spearman correlation.
Modifiers: inline Type parameters: 'T, ^a |
Calculates the spearman correlation of two samples. The two samples are built by applying the given function to each element of the sequence. The function should transform each sequence element into a tuple of paired observations from the two samples. The correlation will be calculated between the paired observations.
Example
val ab: {| A: float; B: float |} list
anonymous record field A: float
anonymous record field B: float
module Seq
from Microsoft.FSharp.Collections
|
Full Usage:
Seq.spearmanOfPairs seq
Parameters:
(^T * ^T) seq
-
The input sequence.
Returns: float
The spearman correlation.
Modifiers: inline Type parameters: ^T |
Example
val xy: (float * float) list
module Seq
from Microsoft.FSharp.Collections
|
FSharp.Stats