get_elder: Calculate weighted feature correlation score

Description Usage Arguments Value Examples

View source: R/get_siblings.R

Description

For every feature, this function calculates a feature correlation score that is dervied from the sum of all weighted correlations (see weighting function) between y and pairwise features that said feature is a component of.

Usage

1
get_elder(sorted_corrs)

Arguments

sorted_corrs

a vector of floats between -1 and 1 representing the the correlation coeficient between a pairwise feature and the outcome variable y. Output by get_sorted_corrs_pairwise_features().

Value

a numeric vector of length one. The value is the correlation of the elder with y when all pairwise features containing elder are accounted for (after weighting). The name of this numeric vector is the index of the elder in X as a character vector (i.e. string)

Examples

1
2
3
4
5
6
7
8
C <- 100  # represents samples
R <- 200 # represents features
y <- rnorm(C) # represents outcome variable
X <- matrix(rbeta(R*C, 2, 3), nrow = R)  # simulate data matrix
Is <- get_pairwise_rank_matrices(X)
pairwise_feature_mat <- make_feature_pair_score_matrix(Is)
sorted_corrs <- get_sorted_corrs_pairwise_features(pairwise_feature_mat, y)
elder <- get_elder(sorted_corrs)

mdkessler/kTSCR documentation built on Feb. 25, 2021, 10:31 p.m.