model_evaluation_hyperparameter_optimization_mlrmbo: Construct and evaluate a ligand-target model given input...

View source: R/parameter_optimization.R

model_evaluation_hyperparameter_optimization_mlrmboR Documentation

Construct and evaluate a ligand-target model given input parameters with the purpose of hyperparameter optimization using mlrMBO.

Description

model_evaluation_hyperparameter_optimization_mlrmbo will take as input a setting of parameters (hyperparameters), data source weights and layer-specific networks to construct a ligand-target matrix and evaluate its performance on input validation settings (average performance for both target gene prediction and ligand activity prediction, as measured via the auroc and aupr).

Usage

model_evaluation_hyperparameter_optimization_mlrmbo(x, source_weights, algorithm, correct_topology, lr_network, sig_network, gr_network, settings, secondary_targets = FALSE, remove_direct_links = "no",damping_factor = NULL,...)

Arguments

x

A list containing the following elements. $lr_sig_hub: hub correction factor for the ligand-signaling network; $gr_hub: hub correction factor for the gene regulatory network; $damping_factor: damping factor in the PPR algorithm if using PPR and optionally $ltf_cutoff: the cutoff on the ligand-tf matrix. For more information about these parameters: see construct_ligand_target_matrix and apply_hub_correction.

source_weights

A named numeric vector indicating the weight for every data source.

algorithm

Selection of the algorithm to calculate ligand-tf signaling probability scores. Different options: "PPR" (personalized pagerank), "SPL" (shortest path length) and "direct"(just take weights of ligand-signaling network as ligand-tf weights). Default and recommended: PPR.

correct_topology

This parameter indicates whether the PPR-constructed ligand-target matrix will be subtracted by a PR-constructed target matrix. TRUE or FALSE.

lr_network

A data frame / tibble containing ligand-receptor interactions (required columns: from, to, source)

sig_network

A data frame / tibble containing signaling interactions (required columns: from, to, source)

gr_network

A data frame / tibble containing gene regulatory interactions (required columns: from, to, source)

settings

A list of lists for which each sub-list contains the following elements: .$name: name of the setting; .$from: name(s) of the ligand(s) active in the setting of interest; .$response: named logical vector indicating whether a target is a TRUE target of the possibly active ligand(s) or a FALSE.

secondary_targets

Indicate whether a ligand-target matrix should be returned that explicitly includes putative secondary targets of a ligand (by means of an additional matrix multiplication step considering primary targets as possible regulators). Default: FALSE

remove_direct_links

Indicate whether direct ligand-target and receptor-target links in the gene regulatory network should be kept or not. "no": keep links; "ligand": remove direct ligand-target links; "ligand-receptor": remove both direct ligand-target and receptor-target links. Default: "no"

damping_factor

The value of the damping factor if damping factor is a fixed parameter and will not be optimized and thus not belong to x. Default NULL.

...

Additional arguments to make_discrete_ligand_target_matrix.

Value

A numeric vector of length 4 containing the average auroc for target gene prediction, average aupr (corrected for TP fraction) for target gene prediction, average auroc for ligand activity prediction and average aupr for ligand activity prediction.

Examples

## Not run: 
library(dplyr)
nr_datasources = source_weights_df$source %>% unique() %>% length()
test_input = list("lr_sig_hub" = 0.5, "gr_hub" = 0.5, "damping_factor" = 0.5)
source_weights = source_weights_df$weight
names(source_weights) = source_weights_df$source

## End(Not run)


saeyslab/nichenetr documentation built on Sept. 7, 2024, 10:27 a.m.