
Plots a model or a population of model objectsas barplots of scaled coefficients.
plotModel.Rd
Plots a model or a population of models as a barplots, representing each feature, the length being the coefficient
Usage
plotModel(
mod,
X,
y,
sort.features = FALSE,
sort.ind = NULL,
feature.name = FALSE,
col.sign = c("deepskyblue1", "firebrick1"),
main = "",
slim = FALSE,
importance = FALSE,
res_clf = NULL
)
Arguments
- mod:
a model to plot
- X:
the data matrix with variables in the rows and observations in the columns
- y:
the class vector
- sort.features:
wether the features need to be sorted by correlation with 'y' or not (default: TRUE)
- sort.ind:
computing sorting can take time if computed for every model and can be computed outside the function and passed as a parameter
- feature.name:
show the name of the features (default:FALSE)
- col.sign:
the colors of the cofficients based on the sign of the coefficients (default: -1=deepskyblue1, 1:firebrick1)
- main:
possibility to change the title of the function (default:"")
- slim:
plot without axis information (default:FALSE)
- importance:
the importance (mda) of the features in crossval
- res_clf:
the result of the learning process (default:NULL). If provided information on MDA will be extracted for the importance graphic.