wrapper_average_performances: Calculate average performance of datasets of a specific...

View source: R/evaluate_model_target_prediction.R

wrapper_average_performancesR Documentation

Calculate average performance of datasets of a specific ligand.

Description

wrapper_average_performances Calculate average performance of datasets of a specific ligand. Datasets profiling more than one ligand (and thus ligands other than the ligand of interest), will be included as well.

Usage

wrapper_average_performances(ligand_oi,performances, averaging = "median")

Arguments

ligand_oi

Name of the ligand for which datasets should be averaged.

performances

A data frame with performance values, containing at least folowing variables: $setting, $ligand and one or more metrics.

averaging

How should performances of datasets of the same ligand be averaged? 'median' or 'mean'.

Value

A data frame containing classification evaluation measures for the ligand activity state prediction single, individual feature importance measures.

Examples

## Not run: 
weighted_networks = construct_weighted_networks(lr_network, sig_network, gr_network, source_weights_df)
settings = lapply(expression_settings_validation[1:5],convert_expression_settings_evaluation)
ligands = extract_ligands_from_settings(settings)
ligand_target_matrix = construct_ligand_target_matrix(weighted_networks, ligands)
perf1 = lapply(settings,evaluate_target_prediction,ligand_target_matrix)
performances_target_prediction_averaged = ligands %>% lapply(wrapper_average_performances, perf1,"median") %>% bind_rows() %>% drop_na()

## End(Not run)


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