ATC_approx: Ability to correlate to other rows - an approximated method

View source: R/stat.R

ATC_approxR Documentation

Ability to correlate to other rows - an approximated method

Description

Ability to correlate to other rows - an approximated method

Usage

ATC_approx(mat, cor_fun = stats::cor, min_cor = 0, power = 1, k_neighbours = -1,
    mc.cores = 1, cores = mc.cores, n_sampling = c(1000, 500),
    group = NULL, ...)

Arguments

mat

A numeric matrix. ATC score is calculated by rows.

cor_fun

A function which calculates correlations on matrix rows.

min_cor

Cutoff for the minimal absolute correlation.

power

Power on the correlation values.

k_neighbours

Nearest k neighbours. Note when this argument is set, there won't be subset sampling for calculating correlations, whihc means, it will calculate correlation to all other rows.

mc.cores

Number of cores. This argument will be removed in future versions.

cores

Number of cores.

n_sampling

When there are too many rows in the matrix, to get the curmulative distribution of how one row correlates other rows, actually we don't need to use all the rows in the matrix, e.g. 1000 rows can already give a very nice estimation.

group

A categorical variable. If it is specified, the correlation is only calculated for the rows in the same group as current row.

...

Pass to cor_fun.

Details

For a matrix with huge number of rows. It is not possible to calculate correlation to all other rows, thus the correlation is only calculated for a randomly sampled subset of othe rows.

With small numbers of rows of the matrix, ATC should be used which calculates the "exact" ATC value, but the value of ATC and ATC_approx should be very similar.

Examples

# There is no example
NULL


jokergoo/cola documentation built on Feb. 29, 2024, 1:41 a.m.