knitr::opts_chunk$set( warning = F, error = F, message = F, collapse = T, comment = "#>", fig.path = "man/figures/README-", fig.pos = "center" #out.width = "100%" )
library(badger) git_repo <- "systats/mlgraph" cat( #badge_travis(git_repo), #"[](https://codecov.io/gh/favstats/peRspective?branch=master)", badge_code_size(git_repo), badge_last_commit(git_repo), badge_lifecycle("experimental", "blue") )
mlgraph
provides performance visualizations for standardized ml models with linear, binary or multi tasks. It is implemented as an extension of deeplyr. At the moment several graphics packages are implemented including
gg_
ggplot2 hc_
highcharter ax_
apexcharter Computations are based on
Several task specific plots are available:
Get the development version from GitHub with:
# install.packages("devtools") devtools::install_github("systats/mlgraph")
pacman::p_load(tidyverse, mlgraph) ggplot2::theme_set(ggplot2::theme_bw())
preds <- readRDS("data/preds.rds") %>% glimpse
df <- mlgraph::eval_classifier(preds, target, pred, prob1) %>% glimpse
gg_plot2 <- gridExtra::grid.arrange( gg_plot_confusion(df$confusion), gg_plot_roc(df$roc), gg_plot_density(df$dens), nrow = 1 ) ggsave(gg_plot2, filename = "man/figures/gg_plot2.png", width = 18, height = 6)
pacman::p_load(shiny, shiny.semantic) shiny.semantic::semanticPage( div(class= "ui three column grid", div(class = "column", hc_plot_confusion(df$confusion) ), div(class = "column", hc_plot_roc(df$roc) ), div(class = "column", hc_plot_density(df$dens) ) ) )
pacman::p_load(shiny, shiny.semantic) shiny.semantic::semanticPage( div(class= "ui three column grid", div(class = "column", ax_plot_confusion(df$confusion) ), div(class = "column", ax_plot_roc(df$roc) ), div(class = "column", ax_plot_density(df$dens) ) ) ) #htmltools::html_print(out)
sessionInfo()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.