collect_results: Collect and aggregate results

View source: R/utils.R

collect_resultsR Documentation

Collect and aggregate results

Description

Collect and aggregate performance, contribution and importance estimations of a set of raw results produced by run_misty().

Usage

collect_results(folders)

Arguments

folders

Paths to folders containing the raw results from run_misty().

Value

List of collected performance, contributions and importances per sample, performance and contribution statistics and aggregated importances.

improvements

Long format tibble with measurements of performance for each target and each sample. Available performance measures are RMSE and variance explained (R2) for a model containing only an intrinsic view (intra.RMSE, intra.R2), model with all views (multi.RMSE, multi.R2), gain of RMSE and gain of variance explained of multi-view model over the intrisic model where gain.RMSE is the relative decrease of RMSE in percent, while gain.R2 is the absolute increase of variance explained in percent. Each value represents the mean performance across folds (k-fold cross-validation). The p values of a one sided t-test of improvement of performance (p.RMSE, p.R2) are also available as a measure.

improvements.stats

Long format tibble with summary statistics (mean, standard deviation and coefficient of variation) for all performance measures for each target over all samples.

contributions

Long format tibble with the values of the coefficients for each view in the meta-model, for each target and each sample. The p values for the coefficient for each view, under the null hypothesis of zero contribution to the meta model are also available.

contributions.stats

Long format tibble with summary statistics for all views per target over all samples. Including mean coffecient value, fraction of contribution, mean and standard deviation of p values.

importances

List of view-specific predictor-target importance tables per sample. The importances in each table are standardized per target and weighted by the quantile of the coefficient for the target in that view. Columns other than Predictor represent target markers.

importances.aggregated

A list of aggregated view-specific predictor-target importance tables . Aggregation is reducing by mean over all samples.

See Also

run_misty() to train models and generate results.

Examples

# Train and collect results for 3 samples in synthetic

library(dplyr)
library(purrr)

data("synthetic")

misty.results <- synthetic[seq_len(3)] %>%
  imap_chr(~ create_initial_view(.x %>% select(-c(row, col, type))) %>%
    add_paraview(.x %>% select(row, col), l = 10) %>%
    run_misty(paste0("results/", .y))) %>%
  collect_results()
str(misty.results)

saezlab/mistyR documentation built on March 25, 2024, 4:12 p.m.