Description Usage Arguments Value
View source: R/explain_comment.R
Using the xgboost model and explainer from the build_topic_explainer function, this function explains how the algorithm reached its prediction.
1 2 3 4 5 6 7 | explain_comment(
xgbmodel,
explainer,
unlabelled_dtm,
comment_index,
threshold = 0.02
)
|
xgbmodel |
Xgbmodel output from the build_topic_explainer function. |
explainer |
Explainer output from the build_topic_explainer function. |
unlabelled_dtm |
Unlabelled document-term matrix. |
comment_index |
The index of the comment in the unlabelled dataset that the user wants to explore. |
threshold |
The waterfall chart will group all variables with absolute impact less than the threshold into a variable called 'Other'. Default: 0.02 |
A waterfall chart that demonstrates how the inclusion/exclusion of certain words informed its decision.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.