Tidy wrapper around varPro::sdependent() for a uvarpro object. Where
gg_udependent() draws the cross-variable dependency graph,
gg_sdependent() surfaces sdependent()'s signal-variable detection: a
ranked table of the per-variable signal score and graph degree, with the
variables flagged as "signal" (those whose dependency structure clears the
detection threshold).
gg_sdependent(
object,
...,
threshold = 0.25,
q.signal = 0.75,
directed = TRUE,
min.degree = NULL,
beta_fit = NULL
)A gg_sdependent object (a data.frame), one row per candidate
variable, most-signal first, with columns:
variablefactor; levels reversed so the top variable lands at
the top after coord_flip().
imp_scoresdependent() per-variable signal score.
degreenode degree in the dependency graph.
signallogical; variable is in sdependent()$signal.vars.
The provenance attribute records source, family ("unsupv"),
threshold, q.signal, directed, n_signal, and n_var.
A uvarpro object from varPro::uvarpro().
Forwarded to varPro::get.beta.entropy() when beta_fit = NULL;
ignored, with a warning, when beta_fit is supplied.
Passed to
varPro::sdependent() (defaults match gg_udependent()).
Optional precomputed varPro::get.beta.entropy() matrix.
sdependent() runs on the varPro::get.beta.entropy() lasso-coefficient
matrix and returns, with plot = FALSE, a list of imp.score (per-variable
signal score), degree (node degree in the dependency graph), and
signal.vars (the detected signal set). This wrapper tidies that into one
row per candidate variable, ranked by imp.score. Because the entropy
matrix is the expensive part, beta_fit accepts a precomputed
varPro::get.beta.entropy() matrix (shared with gg_beta_uvarpro() and
gg_udependent()).
gg_udependent() (the dependency graph), gg_beta_uvarpro()
(lasso importance), varPro::sdependent(), varPro::uvarpro().
# \donttest{
if (requireNamespace("varPro", quietly = TRUE)) {
set.seed(1)
o <- varPro::uvarpro(mtcars, ntree = 50)
gg <- gg_sdependent(o)
plot(gg)
}
# }
Run the code above in your browser using DataLab