R/pip_plot.R

Defines functions pip_plot

pip_plot <- function(x, ...) {
  label    <- x$label
  var_prob <- x$var_prob

  df <- data.frame(label = label, var_prob = var_prob)

  if (x$model == "separate")
    title <- "PIP (Separate Model)"
  else if (x$model == "single")
    title <- "PIP (Single Model)"

  ggcharts::bar_chart(df, label, var_prob, ...) +
    ggplot2::labs(
      y     = "Probability",
      x     = "Variables",
      title = title
    )
}

Try the bartcs package in your browser

Any scripts or data that you put into this service are public.

bartcs documentation built on June 22, 2024, 6:48 p.m.