View source: R/analyzeImportantFeaturesFBM.R
plotImportanceFeaturesFBMobjects | R Documentation |
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.
plotImportanceFeaturesFBMobjects(
FBMobjList,
verbose = TRUE,
nb.top.features = 100,
makeplot = TRUE
)
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)'). |
**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.
If 'makeplot' is 'TRUE', a PDF file is created with the feature importance and prevalence plots. Otherwise, a list of plot objects is returned.
## Not run:
# Plot feature importance and related metrics
plotImportanceFeaturesFBMobjects(FBMobjList = my_FBM_objects, makeplot = TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.