Skip to contents

Ranked lollipop of the per-variable sdependent() signal score, sorted descending so the strongest signal lands at the top. Points are colored blue for variables flagged as signal (signal == TRUE) and gray otherwise.

Usage

# S3 method for class 'gg_sdependent'
plot(x, labels = NULL, ...)

Arguments

x

A gg_sdependent object from gg_sdependent().

labels

Optional variable labels for the variable axis. One of: a named character vector (c(bpd = "BP Diastole")); a labelled data frame, whose attr(col, "label") values are read; or a two-column key/label data frame. Variables with no label keep their raw name. Defaults to NULL (raw names).

...

Not currently used.

Value

A ggplot object.

Reading the chart

Each lollipop is a variable's signal score from varPro::sdependent(), computed on the unsupervised entropy-region lasso structure of a varPro::uvarpro() fit. Blue variables cleared the detection threshold and are reported in sdependent()$signal.vars; gray ones did not. Pair with gg_udependent() (the dependency graph) to see how the signal variables connect, and with gg_beta_uvarpro() for the lasso-importance ranking.

Examples

# \donttest{
if (requireNamespace("varPro", quietly = TRUE)) {
  set.seed(1)
  o <- varPro::uvarpro(mtcars, ntree = 50)
  plot(gg_sdependent(o))
}

# }