Repository navigation
Releases
vip 0.5.0
New features
- New
plot()method for"vi"objects; this is now the primary plotting
interface. Itstypeargument ("bar","point","boxplot", or
"violin") selects the display, and additional arguments are passed
directly on totinyplot::tinyplot()(e.g.,
plot(vi(fit), type = "point", col = "red", pch = 17)).vip()remains as
a convenience wrapper that computes and plots in one call (its...are
reserved forvi()).
Breaking changes
-
vip()now draws plots with lightweight base R graphics via the
tinyplot package instead of
returning a ggplot2 object. The plot is drawn as a side effect and the
underlying"vi"object is returned invisibly. Consequently:- The
mappingargument (a ggplot2 aesthetic mapping) is deprecated and
ignored with a warning. - The
aestheticsargument is deprecated in favor ofplot_args, a named
list of base R graphical parameters (e.g.,col,fill,pch,cex,
lwd) passed on totinyplot::tinyplot(); supplyingaestheticswarns
but still works for this release. geom = "bar"is the new preferred value for bar charts; the
ggplot2-era value"col"is retained as a silent legacy alias.- ggplot2 was removed from the package's dependencies entirely.
- The
-
vi()and friends now return a plain data frame with class"vi"instead
of a tibble; printing changes accordingly. Usetibble::as_tibble()on the
result if you prefer a tibble. -
Slimmed down the dependency tree: vip now imports only
stats,
tinyplot, andutils:tibblewas removed entirely (see above).foreachmoved to Suggests; it is only needed (and only loaded) when
callingvi_permute()withparallel = TRUE.yardstickmoved to Suggests; it is only needed when specifying a
built-in metric by name (you can always supply your own metric function
instead).
-
When subsampling is requested via
sample_sizeorsample_frac,
vi_permute()now draws a single subsample per Monte Carlo repetition and
recomputes the baseline performance on that subsample. Previously, a
different subsample was drawn for every feature and compared against a
baseline computed on the full training set, which biased the scores and
compared features on different rows. Results will differ slightly from
previous versions whenever subsampling is used.
Fixed
-
vi(..., rank = TRUE)now correctly assigns rank 1 to the most important
feature regardless of thesortanddecreasingarguments; previously the
ranks were reversed (and essentially meaningless) wheneversort = FALSE. -
vi_permute()no longer errors when computing importance for a single
feature (e.g.,feature_namesof length one withnsim = 1). -
list_metrics()now returns thesmaller_is_bettercolumn as a logical
(as documented) instead of a character vector, and correctly lists
j_index_vecas the yardstick function backing the"youden"metric. -
The full test suite runs again under
R CMD checkin CI:tests/tinytest.R
now honors theNOT_CRANenvironment variable in addition to the
development-version check, soat_home()-gated tests are no longer silently
skipped for release versions. -
The (previously ignored)
verboseargument tovi_permute()now works as
documented, and supplying the deprecatedreference_classargument
triggers a deprecation warning instead of being silently ignored. -
Exactly-zero coefficients (common with lasso models) now get
Sign = "POS"
instead of"NEG"invi_model()output for glmnet and Spark ML linear
models.
Changed
-
Major internal cleanup of
vi_model(): all methods now share an internal
new_vi()constructor, duplicate method definitions were removed, and
identical methods are aliased. No user-visible changes. -
Small speedups in
vi_permute()(column-level permutation androwMeans())
andvi_shap()(colMeans()). -
The introductory vignette was rewritten as a plain, fast-building
rmarkdown::html_vignette(the old precompiled, paper-length vignette is
superseded by the R Journal article). -
Installation instructions now point to
r-universe; the package is no
longer distributed on CRAN.