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

View source: R/calculate_popularity_bias.R

get_slope_target_gene_popularity_ligand_predictionR Documentation

Regression analysis between target gene popularity and ligand activity predictive performance

Description

get_slope_target_gene_popularity_ligand_prediction: Performs regression analysis to investigate the trend between a particular classficiation evaluation metric (ligand activity prediction) and the popularity of target genes.

Usage

get_slope_target_gene_popularity_ligand_prediction(metric,performances)

Arguments

metric

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

performances

A data.frame in which the performance measures for ligand activity predictions of ligands are denoted together with the popularity bin of the target genes for which predictions were evaluated (should contain at least following variables: target_bin_id 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 target genes.

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)
# ncitations = get_ncitations_genes()
performances_target_bins_popularity = evaluate_ligand_prediction_per_bin(5,settings,ligand_target_matrix,ncitations)
slopes_auroc = get_slope_target_gene_popularity_ligand_prediction("auroc",performances_target_bins_popularity)
slopes_df = performances_target_bins_popularity %>% select(-importance_measure, -target_bin_id) %>% colnames() %>% lapply(.,get_slope_target_gene_popularity_ligand_prediction,performances_target_bins_popularity) %>% bind_rows()

## End(Not run)


saeyslab/nichenetr documentation built on April 27, 2024, 9:24 p.m.