plotImportanceFeaturesFBMobjects: Plot Feature Importance, Prevalence, and Effect Sizes from...

View source: R/analyzeImportantFeaturesFBM.R

plotImportanceFeaturesFBMobjectsR Documentation

Plot Feature Importance, Prevalence, and Effect Sizes from Final Models

Description

This function takes a list of 'listFBMfeatures' objects (produced by the 'getImportanceFeaturesFBMobjects' function), and generates a series of plots visualizing the feature importance, prevalence across models, effect sizes, and feature prevalence across groups. The plots are generated for the top features, based on their importance, and saved in a PDF file.

Usage

plotImportanceFeaturesFBMobjects(
  FBMobjList,
  verbose = TRUE,
  nb.top.features = 100,
  makeplot = TRUE
)

Arguments

FBMobjList

A list of 'listFBMfeatures' objects, typically produced by 'getImportanceFeaturesFBMobjects'.

verbose

Logical. If 'TRUE', print detailed messages.

nb.top.features

Integer. The number of top features to display in the plots. Default is 100.

makeplot

Logical. If 'TRUE', generate the plots. If 'FALSE', return the plot objects without saving.

pdf.dims

A vector of two numbers specifying the width and height of the PDF (default is 'c(width = 25, height = 20)').

Details

**Workflow**: - Extracts feature importance, prevalence, and effect size data from the given 'FBMobjList'. - Selects the top features based on their importance across multiple datasets. - Generates four key visualizations: 1. Feature prevalence in the final population of models. 2. Feature importance across models. 3. Effect sizes (Cliff's delta for classification or Spearman's rho for regression). 4. Feature prevalence across groups (e.g., -1, 1 classes for classification tasks). - If 'makeplot' is 'TRUE', the plots are saved to a PDF file.

**Requirements**: - The input 'FBMobjList' must be a list of 'listFBMfeatures' objects, as produced by 'getImportanceFeaturesFBMobjects'. - Helper functions for plotting such as 'plotPrevalence' and 'computeEffectSizes' must be defined.

Value

If 'makeplot' is 'TRUE', a PDF file is created with the feature importance and prevalence plots. Otherwise, a list of plot objects is returned.

Examples

## Not run: 
# Plot feature importance and related metrics
plotImportanceFeaturesFBMobjects(FBMobjList = my_FBM_objects, makeplot = TRUE)

## End(Not run)


predomics/predomicspkg documentation built on Dec. 11, 2024, 11:06 a.m.