kstar: Determine optimal rank

View source: R/utilities3.R

kstarR Documentation

Determine optimal rank

Description

Determine optimal rank

Usage

kstar(object, df = NULL, BF.threshold = 3, type = 1, m = 96)

Arguments

object

scNMFSet object containing factorization output, or data frame containing the rank-evidence profile.

df

Degrees of freedom for split fit. Upper bound is the total number of data points (number of rank values scanned).

BF.threshold

Bayes factor threshold for statistical threshold.

type

c(1,2). Type 1 is where there is a clear maximum. Type 2 is where marginal likelihood reaches a maximal level and stays constant. If omitted, the type will be inferred from data.

m

Number of features (e.g., genes) in the count matrix. Only necessary when object is of type data.frame.

Details

The input object is used along with Bayes factor threshold to determine the heterogeneity type (1 or 2) and the optimal rank. If evidence(rank 1)/evidence(rank2) > BF.treshold, rank 1 is favorable than rank 2.

Value

List containing type and ropt (optimal rank).

Examples

set.seed(1)

mskcc/tempoSig documentation built on Feb. 3, 2023, 8:35 a.m.