No matching definitions.

stats/cov

src/stats/cov.tur
defn

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

defn

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

defn

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

defn

cov-matrix

(cov-matrix [cols :int names :int] :int)

pairwise covariance matrix over a list of columns.

colscons list of :int (float64 column handles)
namescons list of :cstr (column names)

:int frame with N rows and N+1 columns ("name" + one per input column).

Since: ST2

defn

cor-matrix

(cor-matrix [cols :int names :int] :int)

Pearson correlation matrix over a list of columns.

colscons list of :int (float64 column handles)
namescons list of :cstr (column names)

:int frame (N rows, N+1 columns).

Since: ST2

defn

cor-matrix-spearman

(cor-matrix-spearman [cols :int names :int] :int)

Spearman correlation matrix.

colscons list of :int (float64 column handles)
namescons list of :cstr

:int frame (N rows, N+1 columns).

Since: ST2

defn

frame-cor

(frame-cor [f :int names :int] :int)

Pearson correlation matrix for named columns of a frame.

f:int frame handle
namescons list of :cstr column names

:int correlation matrix frame.

Since: ST2

defn

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