Learn R Programming

lares (version 5.2.13)

mplot_topcats: Top Hit Ratios for Multi-Classification Models

Description

Calculate and plot a multi-class model's predictions accuracy based on top N predictions and distribution of probabilities.

Usage

mplot_topcats(tag, score, multis, model_name = NA)

Value

Plot with performance results over most frequent categories.

Arguments

tag

Vector. Real known label.

score

Vector. Predicted value or model's result.

multis

Data.frame. Containing columns with each category probability or score (only used when more than 2 categories coexist).

model_name

Character. Model's name

See Also

Other ML Visualization: mplot_conf(), mplot_cuts(), mplot_cuts_error(), mplot_density(), mplot_full(), mplot_gain(), mplot_importance(), mplot_lineal(), mplot_metrics(), mplot_response(), mplot_roc(), mplot_splits()

Examples

Run this code
Sys.unsetenv("LARES_FONT") # Temporal
data(dfr) # Results for AutoML Predictions
mplot_topcats(dfr$class3$tag, dfr$class3$score,
  multis = subset(dfr$class3, select = -c(tag, score)),
  model_name = "Titanic Class Model"
)

Run the code above in your browser using DataLab