mle.getEncodingLength: Minimum encoding length (MLE)

Description Usage Arguments Value Examples

View source: R/mle.getEncodingLength.r

Description

This function calculates the mininmum encoding length associated with a subset of variables given a background knowledge graph.

Usage

1
mle.getEncodingLength(bs, pvals, ptID, G)

Arguments

bs

- A list of bitstrings associated with a given patient's perturbed variables.

pvals

- The matrix that gives the perturbation strength significance for all variables (columns) for each patient (rows)

ptID

- The row name in data.pvals corresponding to the patient you specifically want encoding information for.

G

- A list of probabilities with list names being the node names of the background graph.

Value

df - a data.frame object, for every bitstring provided in bs input parameter, a row is returned with the following data: the patientID; the bitstring evaluated where T denotes a hit and 0 denotes a miss; the subsetSize, or the number of hits in the bitstring; the individual p-values associated with the variable's perturbations, delimited by '/'; the combined p-value of all variables in the set using Fisher's method; Shannon's entropy, IS.null; the minimum encoding length IS.alt; and IS.null-IS.alt, the d.score.

Examples

1
2
3
4
5
6
7
8
# Identify the most significant subset per patient, given the background graph
data_mx.pvals = t(apply(data_mx, c(1,2), function(i) 2*pnorm(abs(i), lower.tail = FALSE)))
for (pt in 1:ncol(data_mx)) {
    ptID = colnames(data_mx)[pt]
    res = mle.getEncodingLength(ptBSbyK[[ptID]], data_mx.pvals, ptID, G)
    res = res[order(res[,"d.score"], decreasing=TRUE),]
    print(res)
}

BRL-BCM/CTD documentation built on March 21, 2020, 8:39 a.m.