Skip to contents

get_ligand_slope_ligand_prediction_popularity: Performs regression analysis to investigate the trend between a particular classficiation evaluation metric and the popularity of left-out ligands for ligand activity prediction performance.

Usage

get_ligand_slope_ligand_prediction_popularity(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 target gene predictions of ligands are denoted together with the "popularity index" indicating which percentage of most popular ligands were left out.)

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 left out ligands.

Examples

if (FALSE) { # \dontrun{
library(dplyr)
settings <- lapply(expression_settings_validation[1:5], convert_expression_settings_evaluation)
settings_ligand_pred <- convert_settings_ligand_prediction(settings, all_ligands = unlist(extract_ligands_from_settings(settings, combination = FALSE)), validation = TRUE, single = TRUE)

weighted_networks <- construct_weighted_networks(lr_network, sig_network, gr_network, source_weights_df)
ligands <- extract_ligands_from_settings(settings_ligand_pred, combination = FALSE)
ligand_target_matrix <- construct_ligand_target_matrix(weighted_networks, lr_network, ligands)
ligand_importances <- dplyr::bind_rows(lapply(settings_ligand_pred, get_single_ligand_importances, ligand_target_matrix))

ligand_activity_popularity_bias <- lapply(0:3, ligand_activity_performance_top_i_removed, ligand_importances, ncitations) %>% bind_rows()
slopes_auroc <- get_ligand_slope_ligand_prediction_popularity("auroc", ligand_activity_popularity_bias)
slopes_df <- ligand_activity_popularity_bias %>%
  select(-importance_measure, -popularity_index) %>%
  colnames() %>%
  lapply(., get_ligand_slope_ligand_prediction_popularity, ligand_activity_popularity_bias) %>%
  bind_rows()
} # }