model.interpretation.plot.RdThis function produces a plot for model interpretation
model.interpretation.plot(siamcat, fn.plot = NULL,
color.scheme = "BrBG", consens.thres = 0.5, heatmap.type = "zscore",
limits = c(-3, 3), log.n0 = 1e-06, max.show = 50, prompt=TRUE,
verbose = 1)object of class siamcat-class
string, filename for the pdf-plot
color scheme for the heatmap, defaults to 'BrBG'
float, minimal ratio of models incorporating a feature
in order to include it into the heatmap, defaults to 0.5
Note that for 'randomForest' models, this cutoff specifies the
minimum median Gini coefficient for a feature to be included and
should therefore be much lower, e.g. 0.01
string, type of the heatmap, can be either 'fc'
or 'zscore', defaults to 'zscore'
vector, cutoff for extreme values in the heatmap,
defaults to c(-3, 3)
float, pseudocount to be added before log-transformation
of features, defaults to 1e-06
integer, maximum number of features to be shown in the model interpretation plot, defaults to 50
boolean, turn on/off prompting user input when not plotting into a pdf-file, defaults to TRUE
control output: 0 for no output at all, 1
for only information about progress and success, 2 for normal
level of information and 3 for full debug information,
defaults to 1
Does not return anything, but produces the model interpretation plot.
Produces a plot consisting of
a barplot showing the feature weights and their robustness (i.e. in what proportion of models have they been incorporated)
a heatmap showing the z-scores of the metagenomic features across samples
another heatmap displaying the metadata categories (if applicable)
a boxplot displaying the poportion of weight per model that is
actually shown for the features that are incorporated into more than
consens.thres percent of the models.
data(siamcat_example)
# simple working example
siamcat_example <- train.model(siamcat_example, method='lasso')
#> Trained lasso models successfully.
model.interpretation.plot(siamcat_example, fn.plot='./interpretion.pdf',
heatmap.type='zscore')
#> Successfully plotted model interpretation plot to: ./interpretion.pdf