View source: R/analyzeImportantFeaturesFBM.R
analyzeImportanceFeaturesFBM | R Documentation |
This function analyzes and visualizes feature importance for FBM models, creating plots for feature prevalence, importance, and effect size. It supports both single and multiple experiments, handling classification and regression modes.
analyzeImportanceFeaturesFBM(
clf_res,
X,
y,
makeplot = TRUE,
saveplotobj = TRUE,
name = "",
verbose = TRUE,
pdf.dims = c(width = 25, height = 20),
filter.cv.prev = 0.25,
nb.top.features = 100,
scaled.importance = FALSE,
k_penalty = 0.75/100,
k_max = 0
)
clf_res |
A classifier result object or a list of classifier results. Each classifier result must contain the trained models and the classifier parameters. |
X |
The feature matrix. |
y |
The response variable. |
makeplot |
Logical, if 'TRUE' (default), plots will be generated and displayed. |
saveplotobj |
Logical, if 'TRUE' (default), the plot objects will be saved as an RData file. |
name |
A character string for the output file name prefix. |
verbose |
Logical, if 'TRUE' (default), progress messages are printed. |
pdf.dims |
A numeric vector specifying the width and height of the PDF output. |
filter.cv.prev |
Numeric, a cutoff for the cross-validation prevalence filter. |
nb.top.features |
Numeric, the number of top features to display. |
scaled.importance |
Logical, if 'TRUE', scales feature importance values. |
k_penalty |
Numeric, a penalty factor applied to control model selection based on sparsity. |
k_max |
Numeric, maximum number of features to include. |
This function examines the FBM classifier results, retrieves the best population of models, calculates feature importance, and generates plots to visualize feature prevalence, importance, and effect size. If multiple experiments are provided, results are averaged across experiments.
**Generated Plots**: - **Feature Prevalence (FBM)**: Shows the frequency and orientation of features across models. - **Feature Importance**: Visualizes feature importance scores. - **Effect Sizes**: Displays the effect sizes of features.
For classification, Cliff's delta is used for effect sizes, and Spearman's rho is used for regression.
If 'makeplot' is 'TRUE', a combined plot of feature importance, prevalence, and effect sizes is returned. Otherwise, a list of individual plot objects.
## Not run:
analyzeImportanceFeaturesFBM(clf_res = my_clf_result, X = X_data, y = y_data, name = "example_analysis")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.