Returns correlation of a prediction direction(s) with an observed response(s). Intended for use as a feature-importance measure for the CRT.

col_cors(preds, Y, genotypes = TRUE)

Arguments

preds

Vector of length n OR a matrix of dimension (n x k) giving the logit inverse of the probability of being one for k different models.

Y

Observed responses, a 0-1 vector of length n or a matrix of dimension (n x k)

genotypes

Whether to interpret the data as genotypes, i.e. summing pairs of rows of logit_inv gives the total logit inverse for the observation.

Returns:

Value

A vector of length k, the correlations of the columns of Y