subsample_robustness: Robustness Analysis Due to Subsampling

Description Usage Arguments Value Examples

View source: R/main.R

Description

This gives a measure of how robust the sparse hierarchical clustering performs on a cohort by subsampling the samples from the target cohort.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
subsample_robustness(
  mat_value,
  dissimilarity = c("squared.distance", "absolute.value"),
  wbounds = NULL,
  nperms = 10,
  min_number_features = 10,
  n_top_ref = 20,
  n_top_sub = 10,
  fs_subsample = seq(0.6, 0.95, 0.05),
  n_times = 200,
  no_cores = NULL,
  seed = 123
)

Arguments

mat_value

A matrix of expression/alteration with samples as rows and features as columns.

dissimilarity

A string for the type of dissimilarity, either "squared.distance" or "absolute.value". Default "squared.distance".

wbounds

The sequence of tuning parameters to consider. If NULL, then a default sequence seq(1.1, sqrt(ncol(mat_value)), 100) will be used. If non-null, should be greater than 1.

nperms

The number of permutations to perform. Default 10.

min_number_features

The minimal number of features that the best wbound could generate. Only wbounds that generates more than this number of features can considered. Default 10.

n_top_ref

The number of top features used as as reference from the full cohort. Default 20.

n_top_sub

The number of top features to be compared from the subsampled cohort. Default 10.

fs_subsample

The sequence of fractions to be subsampled. Default seq(0.6, 0.95, 0.05).

n_times

The number of sampling times for each fraction. Default 200.

no_cores

This function can be run in parallel, in which no_cores is the number of cores. If NULL, (the number of all available cores - 1) is used.

seed

The random seed used in subsampling. Default 123.

Value

A matrix that has columns:

f_subsample

Fraction of data used.

score

Concordance between the features from partial data and the reference features from the full data.

Examples

1
2
3
library(reflect)
mat_value <- egfr_data$mat_value
mat_robust <- subsample_robustness(mat_value, no_cores = 1) # this may take a long time if only 1 core is used.

korkutlab/reflect documentation built on July 5, 2021, 7:38 a.m.