dplot3_conf | R Documentation |
Plot confusion matrix
dplot3_conf(
x,
true.col = "#72CDF4",
false.col = "#FEB2E0",
pos.class = rtenv$binclasspos,
font.size = 18,
main = NULL,
main.y = 1,
main.yanchor = "bottom",
theme = rtTheme,
margin = list(l = 20, r = 5, b = 5, t = 20),
filename = NULL,
file.width = 500,
file.height = 500,
file.scale = 1,
...
)
x |
Confusion matrix where rows are the reference and columns are the estimated classes or
rtemis |
true.col |
Color for true positives & true negatives |
false.col |
Color for false positives & false negatives |
pos.class |
Integer: Index of factor level to treat as the positive class |
font.size |
Integer: font size |
main |
Character: plot title |
main.y |
Numeric: y position of the title |
main.yanchor |
Character: y anchor of the title |
theme |
List or Character: Either the output of a |
margin |
List: Plot margins |
filename |
Character: Path to file to save static plot. |
file.width |
Integer: File width in pixels for when |
file.height |
Integer: File height in pixels for when |
file.scale |
Numeric: If saving to file, scale plot by this number |
... |
Additional arguments passed to theme function. |
A plotly object
EDG
## Not run:
true <- factor(c("a", "a", "a", "a", "b", "b", "b", "b", "b", "b", "b", "b"))
predicted <- factor(c("a", "a", "b", "a", "b", "b", "a", "a", "b", "b", "a", "a"))
predicted.prob <- c(0.7, 0.55, 0.45, 0.62, 0.41, 0.32, 0.59, .63, .32, .21, .52, .58)
error <- mod_error(true, predicted, predicted.prob)
dplot3_conf(error)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.