plot_importance {StratifiedMedicine}R Documentation

Importance Plot: Visualize relative importance of variables

Description

Importance is currently based on the PRISM filter model. For elastic net (filter_glmnet). variables with non-zero coefficients are shown. For random forest variable importance (filter_ranger), variables are sorted by their p-values, and "top_n" will show only the "top_n" most importance variables (based on p-values).

Usage

plot_importance(object, top_n = NULL, ...)

Arguments

object

PRISM object

top_n

Show top_n variables only, default=NULL (show all)

...

Additional arguments (currently ignored).

Value

Plot (ggplot2) object

Examples

library(StratifiedMedicine)
## Continuous ##
dat_ctns = generate_subgrp_data(family="gaussian")
Y = dat_ctns$Y
X = dat_ctns$X
A = dat_ctns$A

mod1 = filter_train(Y=Y, A=A, X=X)
plot_importance(mod1)

[Package StratifiedMedicine version 1.0.5 Index]