get_slope_ligand_popularity: Regression analysis between ligand popularity and target gene...

View source: R/calculate_popularity_bias.R

get_slope_ligand_popularityR Documentation

Regression analysis between ligand popularity and target gene predictive performance

Description

get_slope_ligand_popularity: Performs regression analysis to investigate the trend between a particular classficiation evaluation metric and the popularity of the ligand.

Usage

get_slope_ligand_popularity(metric, performances)

Arguments

metric

The name of the performance metric of which the trend with the popularity of the ligand should be calculated.

performances

A data.frame in which the performance measures for target gene predictions of ligands are denoted together with the popularity of the ligand. (should contain at least following variables: ligand, ncitations and the metric of interest)

Value

A data.frame in which the regression coefficient estimate, p-value and corresponding R-squared value are shown for the regression analysis to investigate the trend between a particular classficiation evaluation metric and the popularity of the ligand.

Examples

## Not run: 
library(dplyr)
weighted_networks = construct_weighted_networks(lr_network, sig_network, gr_network, source_weights_df)
settings = lapply(expression_settings_validation[1:10],convert_expression_settings_evaluation)
ligands = extract_ligands_from_settings(settings)
ligand_target_matrix = construct_ligand_target_matrix(weighted_networks, ligands)
performances = bind_rows(lapply(settings,evaluate_target_prediction,ligand_target_matrix))
# ncitations = get_ncitations_genes()
performances_ligand_popularity = add_ligand_popularity_measures_to_perfs(performances,ncitations)
slopes_auroc = get_slope_ligand_popularity("auroc",performances_ligand_popularity)
slopes_df = performances_ligand_popularity %>% select(-setting,-ligand,-ncitations) %>% colnames() %>% lapply(.,get_slope_ligand_popularity,performances_ligand_popularity) %>% bind_rows()

## End(Not run)



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