stats/cov
cov
(cov [a :int b :int] :float)
sample covariance of two float64 columns (complete-cases).
| a | :int first column | |
| b | :int second column (must be same length as a) |
:float sample covariance (n-1 denominator), or NaN if fewer than 2 pairs.
(cov col-x col-y)
Since: ST2
cor
(cor [a :int b :int] :float)
Pearson correlation of two float64 columns.
| a | :int first column | |
| b | :int second column |
:float Pearson r in [-1, 1], or NaN if degenerate.
Since: ST2
cor-spearman
(cor-spearman [a :int b :int] :float)
Spearman rank correlation of two float64 columns.
| a | :int first column | |
| b | :int second column |
:float Spearman rho in [-1, 1].
Since: ST2
cov-matrix
(cov-matrix [cols :int names :int] :int)
pairwise covariance matrix over a list of columns.
| cols | cons list of :int (float64 column handles) | |
| names | cons list of :cstr (column names) |
:int frame with N rows and N+1 columns ("name" + one per input column).
Since: ST2
cor-matrix
(cor-matrix [cols :int names :int] :int)
Pearson correlation matrix over a list of columns.
| cols | cons list of :int (float64 column handles) | |
| names | cons list of :cstr (column names) |
:int frame (N rows, N+1 columns).
Since: ST2
cor-matrix-spearman
(cor-matrix-spearman [cols :int names :int] :int)
Spearman correlation matrix.
| cols | cons list of :int (float64 column handles) | |
| names | cons list of :cstr |
:int frame (N rows, N+1 columns).
Since: ST2
frame-cor
(frame-cor [f :int names :int] :int)
Pearson correlation matrix for named columns of a frame.
| f | :int frame handle | |
| names | cons list of :cstr column names |
:int correlation matrix frame.
Since: ST2
frame-cor-spearman
(frame-cor-spearman [f :int names :int] :int)
Spearman correlation matrix for named columns.
Since: ST2
Internal definitions
__mat-build__frame-numeric-cols