get_p: Construct Optimisation Parameters.

Description Usage Arguments Value Examples

View source: R/predict.R

Description

An internal function. From the learned generative model and training data, produces a vector of weights p to be used in the subsequent group lasso optimisation, alongside a biomarker-dependent normalisation quantity p_norm.

Usage

1
get_p(gen_model, training_matrix, marker_mut_types, gene_lengths)

Arguments

gen_model

(list) A generative mutation model, fitted by fit_gen_model().

training_matrix

(sparse matrix) A sparse matrix of mutations in the training dataset, produced by get_mutation_tables().

marker_mut_types

(character) A character vector listing which mutation types (of the set specified in the generative model attribute 'names') constitute the biomarker in question.

gene_lengths

(dataframe) A table with two columns: Hugo_Symbol and max_cds, providing the lengths of the genes to be modelled.

Value

A list with three entries:

Examples

1
2
3
4
5
p <- get_p(example_gen_model, example_tables$train$matrix,
           marker_mut_types = c("I"), gene_lengths = example_maf_data$gene_lengths)
print(p$p[1:5])
print(p$p_norm)
print(p$bc[1:5])

ICBioMark documentation built on Nov. 15, 2021, 5:09 p.m.