mplot_conf | R Documentation |
This function plots a confussion matrix.
mplot_conf(
tag,
score,
thresh = 0.5,
abc = TRUE,
squared = FALSE,
diagonal = TRUE,
top = 20,
subtitle = NA,
model_name = NULL,
save = FALSE,
subdir = NA,
file_name = "viz_conf_mat.png"
)
tag |
Vector. Real known label. |
score |
Vector. Predicted value or model's result. |
thresh |
Integer. Threshold for selecting binary or regression
models: this number is the threshold of unique values we should
have in |
abc |
Boolean. Arrange columns and rows alphabetically? |
squared |
Boolean. Force plot to be squared? |
diagonal |
Boolean. |
top |
Integer. Plot only the most n frequent variables.
Set to |
subtitle |
Character. Subtitle to show in plot |
model_name |
Character. Model's name |
save |
Boolean. Save output plot into working directory |
subdir |
Character. Sub directory on which you wish to save the plot |
file_name |
Character. File name as you wish to save the plot |
You may use conf_mat()
to get calculate values.
Plot with confusion matrix results.
Other ML Visualization:
mplot_cuts()
,
mplot_cuts_error()
,
mplot_density()
,
mplot_full()
,
mplot_gain()
,
mplot_importance()
,
mplot_lineal()
,
mplot_metrics()
,
mplot_response()
,
mplot_roc()
,
mplot_splits()
,
mplot_topcats()
Sys.unsetenv("LARES_FONT") # Temporal
data(dfr) # Results for AutoML Predictions
lapply(dfr, head)
# Plot for Binomial Model
mplot_conf(dfr$class2$tag, dfr$class2$scores,
model_name = "Titanic Survived Model"
)
# Plot for Multi-Categorical Model
mplot_conf(dfr$class3$tag, dfr$class3$score,
model_name = "Titanic Class Model"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.