evaluate_target_prediction_regression: Evaluation of target gene value prediction (regression).

View source: R/evaluate_model_target_prediction.R

evaluate_target_prediction_regressionR Documentation

Evaluation of target gene value prediction (regression).

Description

evaluate_target_prediction_regression Evaluate how well the model (i.e. the inferred ligand-target probability scores) is able to predict the observed response to a ligand (e.g. the absolute log fold change value of genes after treatment of cells by a ligand). It shows several regression model fit metrics for the prediction.

Usage

evaluate_target_prediction_regression(setting,ligand_target_matrix, ligands_position = "cols")

Arguments

setting

A list containing 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.

ligand_target_matrix

A matrix of ligand-target probabilty scores (or discrete target assignments).

ligands_position

Indicate whether the ligands in the ligand-target matrix are in the rows ("rows") or columns ("cols"). Default: "cols"

Value

A data.frame with following variables: setting, ligand and as regression model fit metrics: r_squared: R squared, adj_r_squared: adjusted R squared, f_statistic: estimate of F-statistic, lm_coefficient_abs_t: absolute value of t-value of coefficient, inverse_rse: 1 divided by estimated standard deviation of the errors (inversed to become that higher values indicate better fit), reverse_aic: reverse value of Akaike information criterion (-AIC, to become that higher values indicate better fit), reverse_bic: the reverse value of the bayesian information criterion, inverse_mae: mean absolute error, pearson: pearson correlation coefficient, spearman: spearman correlation coefficient.

Examples

## Not run: 
weighted_networks = construct_weighted_networks(lr_network, sig_network, gr_network, source_weights_df)
settings = lapply(expression_settings_validation[1:2],convert_expression_settings_evaluation_regression)
ligands = extract_ligands_from_settings(settings)
ligand_target_matrix = construct_ligand_target_matrix(weighted_networks, ligands)
perf1 = lapply(settings,evaluate_target_prediction_regression,ligand_target_matrix)

## End(Not run)

saeyslab/nichenetr documentation built on Sept. 7, 2024, 10:27 a.m.