register_top_value_method: Register user-defined top value methods

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/z.global.R

Description

Register user-defined top value methods

Usage

1

Arguments

...

a named list of functions.

Details

The user-defined function should accept one argument which is the data matrix and the scores are calculated by rows. Rows with top scores are treated as "top rows". Follow is how we register "sd" top value method:

1

Of course, you can use rowSds to give a faster calculation of row sd:

1

The registered top value method will be used as defaults in run_all_consensus_partition_methods.

To remove a top value method, use remove_top_value_method.

There are four default top value methods:

"sd"

standard deviation, by rowSds

"cv"

coefficient variance, calculated as sd/(mean+s) where s is the 10th quantile of all row means

"MAD"

median absolute deviation, by rowMads

"AAC"

the AAC method

Value

No value is returned.

Author(s)

Zuguang Gu <[email protected]>

See Also

all_top_value_methods lists all registered top value methods.

Examples

1
2
3
4
5
6
7
all_top_value_methods()
register_top_value_method(
    AAC_spearman = function(mat) AAC(mat, cor_method = "spearman"),
    AAC_multicore = function(mat) AAC(mat, mc.cores = 2)
)
all_top_value_methods()
remove_top_value_method(c("AAC_spearman", "AAC_multicore"))

jokergoo/cola documentation built on Nov. 13, 2018, 1:22 p.m.