% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot.gg_ivarpro.R
\name{plot.gg_ivarpro}
\alias{plot.gg_ivarpro}
\title{Plot a \code{gg_ivarpro} object}
\usage{
\method{plot}{gg_ivarpro}(x, ...)
}
\arguments{
\item{x}{A \code{gg_ivarpro} object from \code{\link[=gg_ivarpro]{gg_ivarpro()}}.}

\item{...}{Not currently used.}
}
\value{
A \code{ggplot} object.
}
\description{
Branches on the presence of \code{which_obs} provenance and the \code{class}
column. Distribution view: jittered points showing per-observation
local importances per variable. Per-observation view: horizontal bar
chart of one observation's local importances across variables.
Classification: faceted by class unless \code{which_class} collapses to
a single class.
}
\section{Reading the chart}{

Each point in the distribution view is one observation's local
importance for that variable. Variables are sorted by descending
\verb{mean(|local_imp|)}. The cutoff line picks the variables whose local
importance is, on average, large enough to flag. For a classification
fit, every facet shares the same row order so you can read across.

For a classification fit, variables are sorted by descending
\verb{mean(|local_imp|)} across all (obs, class) rows and that ordering
is shared across every facet, so rows line up between classes for
visual comparison. Each facet has its own cutoff line.

The per-observation view (\code{which_obs}) is a horizontal bar chart of
one observation's local importances; bars below the cutoff are grey,
above are blue. The visual resembles a SHAP waterfall, but the values
are release-rule contributions: scaled per-rule contrasts on observed
data, not Shapley values and not permutation-based.
}

\examples{
\donttest{
if (requireNamespace("varPro", quietly = TRUE) &&
    requireNamespace("MASS", quietly = TRUE)) {
  set.seed(1)
  v <- varPro::varpro(medv ~ ., data = MASS::Boston, ntree = 50)
  plot(gg_ivarpro(v))
}
}

}
\seealso{
\code{\link[=gg_ivarpro]{gg_ivarpro()}}.
}
