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

model_evaluation_optimization_applicationR Documentation

Construct and evaluate a ligand-target model given input parameters with the purpose of parameter optimization for multi-ligand application.

Description

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

Usage

model_evaluation_optimization_application(x, source_names, algorithm, correct_topology, lr_network, sig_network, gr_network, settings, secondary_targets = FALSE, remove_direct_links = "no",classification_algorithm = "lda",damping_factor = NULL,...)

Arguments

x

A list containing parameter values for parameter optimization. $source_weights: numeric vector representing the weight for each data source; $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_names

Character vector containing the names of the data sources. The order of data source names accords to the order of weights in x$source_weights.

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"

classification_algorithm

The name of the classification algorithm to be applied. Should be supported by the caret package. Examples of algorithms we recommend: with embedded feature selection: "rf","glm","fda","glmnet","sdwd","gam","glmboost", "pls" (load "pls" package before!); without: "lda","naive_bayes", "pcaNNet". Please notice that not all these algorithms work when the features (i.e. ligand vectors) are categorical (i.e. discrete class assignments).

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 evaluate_multi_ligand_target_prediction.

Value

A numeric vector of length 2 containing the average auroc and aupr for target gene prediction.

Examples

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

## End(Not run)


saeyslab/nichenetr documentation built on March 26, 2024, 9:22 a.m.