text_explanations: Plot text explanations

plot_text_explanationsR Documentation

Plot text explanations

Description

Highlight words which explains a prediction.

Usage

plot_text_explanations(explanations, ...)

Arguments

explanations

object returned by the lime.character function.

...

parameters passed to htmlwidgets::sizingPolicy()

See Also

Other explanation plots: plot_explanations(), plot_features()

Examples

# We load a precalculated explanation set based on the procedure in the ?lime
# examples
explanations <- .load_text_example()

# We see that the explanations are in the expected format
print(explanations)

# We can now get the explanations in the context of the input text
plot_text_explanations(explanations)


lime documentation built on Aug. 19, 2022, 9:07 a.m.