Repository navigation
CRAN release, accepted 2026-11-03. Tagged on 743cf9c9, the tree submitted to CRAN (recorded in CRAN-SUBMISSION).
-
Articles on the pkgdown site put the table of contents on the left and use
the full width of the window, throughpkgdown/extra.css. The installed
vignettes are unchanged: the Quarto vignette engine renders them in its own
minimal format, which has no sidebar layout. -
gg_udependent()gains two arguments.pre.filteris passed to
varPro::get.beta.entropy(), so a variable the pre-filter would drop can
reach the graph, andbeta.mattakes a precomputed matrix so repeated calls
skip the computation. -
gg_partial_varpro()accepts the unavailable fits that varPro 3.3.1
reports.partialpro()there returns a case whose local fit failed as a
row ofNAinstead of a flat curve; that case is left out of the
averaged curve on every scale. A variable with no available curve at all
now gets a warning naming it, rather than an empty panel that reads like
a flat effect. -
gg_vimp(nvar = )on a multi-classrfsrcforest now keeps thenvar
most important variables. The importance matrix arrives in predictor order
and was trimmed before it was sorted, sonvar = 2onirisreturned
Sepal.LengthandSepal.Width, the two least important. Variables are now
ranked by the overall (all) column first, aswhich.outcome = 0selects.
TherandomForestmethod already did this. -
plot.gg_partial_varpro()now draws only theparametricand
nonparametriccurves by default.causalis a centered contrast that
starts at zero, so on a shared axis with the level curves it squeezed them
into a thin band; on a regression fit the levels sat near the response mean
and the contrast near 0. Ask for it withtype = "causal"(or include it in
type), on an unbounded scale as before. -
gg_partial_varpro(scale = "prob")now restores each subject's level
before averaging, so the curve is the expected proportion it is documented
as.partialpro()fits each subject's curve separately but returns every
row at the cohort-mean intercept, keeping only the subject's slope. That put
every subject at the average log-odds, so"prob"nearly matched
"prob_typical"and missed the proportion it claims to estimate. Each
subject's curve is now shifted to pass through its own out-of-bag log-odds
at its observed value, and the shapepartialpro()fitted is kept. On
simulated data with widely spread subjects, this cut the error against the
true partial dependence from 0.105 to 0.033 (8 of 8 seeds)."prob"
curves change, most on heterogeneous cohorts. The restoration needs
object; without it"prob"warns and returns the old curve. It is also
skipped when...passes a customlearnerornewdata, and for binary
variables, whichpartialpro()already returns per subject. The provenance
recordsanchored. -
gg_partial_varpro()drops its own warning about requestedxvar.namesthe
fit cannot reach. From varPro 3.3.0partialpro()warns and names them
itself, so the warning arrived twice and still called the loss silent.
?gg_partial_varproand the varPro vignette now say the warning is
upstream's. -
The survival vignette loses its "Known issue" callout saying
partial.rfsrc()fails for survival forests. That section renders live and
works on currentrandomForestSRC, and fourgg_partial_rfsrc()survival
tests no longer turn an error into a skip, so a regression now fails. -
?gg_partial_varpronow separates varPro versions in its missing-data and
RMST-horizon notes. Before varPro 3.2.2,varpro()deletes incomplete cases
silently and drops unrecognised arguments such asna.action, and
partialpro()drops a horizon passed through.... From 3.2.2
(kogalur/varPro#7),varpro()warns with the omitted count and records it in
model.info$observations, and both functions stop with an error on an
argument they do not recognise.partialpro()still has no horizon
argument, soscale = "rmst"keeps supplying its own RMST(tau) learner.
Documentation only; no function changed. -
gg_vimp()drops code that was meant to add arel_vimpcolumn but could
never run: every fit, single-outcome included, takes the pivot branch, so no
forest with stored importance ever returned it, and their output is
unchanged. The
@returnnow lists the columns actually returned (vars,set,vimp,
positive), and theNAplaceholder for arandomForestfit without
stored importance no longer carries an all-NArel_vimpcolumn. -
New
gg_ale_rfsrc()computes Accumulated Local Effects (Apley and Zhu,
2020) for regression and classification forests, as a counterpart to
gg_partial_rfsrc(). Partial dependence averages the forest's prediction
over the joint distribution of the other predictors, which evaluates the
forest at predictor combinations that never occur together when predictors
are correlated. ALE only ever perturbs a predictor inside local
neighbourhoods of its own observed values, so it does not extrapolate into
those regions. Supplyingxvar2.namereturns the second-order (interaction)
surface for a pair of continuous predictors, which is zero everywhere when
the two act additively. Survival forests are not supported, the same
limitationgg_shap()carries. For a categorical predictor each step from
one level to the next averages the prediction change over the observations
at both levels, as Apley and Zhu define it. All the modified frames for a
variable, or for an interaction surface, go to the forest in onepredict()
call.plot()andautoplot()methods draw the first-order curves as lines and
bars faceted by variable, matchingplot.gg_partial_rfsrc()'s layout so the
two can be read side by side, and the interaction surface as a heatmap. -
plot.gg_vimp(relative = TRUE)now plots relative VIMP: each variable's
VIMP divided by the largest VIMP in itsset, so the top variable reads 1
(per class for classification). The argument was documented but never read,
so it silently plotted raw VIMP. It now defaults toFALSE. A set with no
positive VIMP is scaled by its largest absolute VIMP, never divided by zero. -
plot.gg_vimp(nvar = )now keeps the topnvarvariables rather than the
topnvarrows, so a classification plot no longer loses class panels. -
gg_partial_varpro()gainsscale = "prob_typical".partialpro()returns
per-subject log-odds, and collapsing them to a curve takes an average and a
back-transform; the ORDER is a modelling choice."prob"(still
the classification default) transforms per observation then averages, giving
the mean predicted probability -- the expected proportion of the cohort.
"prob_typical"averages on the log-odds scale then transforms once, giving
the probability for a subject at the mean log-odds.They are different estimands and they disagree. The inverse logit is concave
above zero and convex below it, so by Jensen"prob"is pulled toward 0.5 at
both ends, by more the more heterogeneous the cohort. In a simulation with
per-subject log-odds SD near 4, a point reading 0.13 under"prob_typical"
reads 0.35 under"prob"(true value 0.38) -- large enough to change how a
figure is read, so the choice should be deliberate. A figure captioned as a
percentage of patients wants"prob".?gg_partial_varprosets out both.The distinction applies only to the
continuousframe; thecategorical
frame keeps values unaveraged, so both scales return the same numbers there. -
plot.gg_partial_varpro()gainsylim, pinning the shared y range across
panels. It could not be set from outside: on thepanelsroute a
coord_cartesian()added with&replaces the per-panel coordinate system
and silently takes the per-panel x ranges with it (0-50 collapsed to the
data's 0-46), whilescale_y_continuous(limits = )is overridden by that
same coordinate system.ylim = c(0, 1)now pins a probability axis so a
flat curve reads as flat instead of filling the panel. -
plot.gg_partial_varpro()now defaultspaletteto"black". These figures
are made for manuscripts, andlinetypeis mapped to the effect type as
well, so the three estimators stay legible as solid, dotted and dashed with
no colour at all. Pass any ColorBrewer name (palette = "Set1") for the
colour scale, which separates two or three overlaid estimators faster on
screen."mono"is a synonym for black and"grey"/"gray"give a flat
grey. This changes rendered output: five vdiffr baselines were
regenerated. -
plot.gg_partial_varpro()gainscomplement, plotting 1 - p and prefixing
the y label with1 -. It reads a fit that targets one class as the
probability of the other -- a weaning-failure model shown as probability of
successful weaning -- without recomputingpartialpro()against the other
target. Requires a probability scale (proborsurv); on the additive,
multiplicative and unbounded scales 1 - x has no referent, so it errors
rather than drawing something unreadable. -
plot.gg_partial_varpro()now warns, naming them, when arguments reach...
that it does not use. Its own arguments sit after...and match by exact
name, so a typo (or an argument from a newer version than the one installed)
previously vanished without a word and left the default plot looking like a
correct answer. -
plot.gg_partial_varpro()gains per-panel scale control.facet_wrap(scales = "free_x")gives each variable its own x range but a single shared x
scale, so per-panel breaks, limits and axis titles were unreachable and a
manuscript figure had to be hand-built oneggplot()per variable. A new
panelsdata frame -- one row per panel, keyed byname, with optional
xlab,xmin,xmax,xbyandspancolumns -- switches rendering to
patchwork, where the x scale can vary between panels.panels = NULL
(the default) is unchanged. -
plot.gg_partial_varpro()gainswhich, to return the continuous or
categorical frame alone as a bareggplot. With both frames populated the
method returns a patchwork, where+reaches only the last panel, so adding
a scale or theme silently modified the categorical plot.whichis the
supported way to get one plot to modify. -
plot.gg_partial_varpro()gainspoints,smooth,palette,ncol,
point_size,point_alphaandlinewidth.palettetakes a ColorBrewer
name and goes through ggplot2's brewer scales, soRColorBrewerstays
inSuggests. All default to the previous rendering. -
The survival vignette's variable-dependence figure passed
time.labelswhere
gg_variable()readstime_labels. The dotted name matched nothing and was
dropped without a warning, so the facet strips rendered as bare "1" and "3"
instead of the intended "1 Year" and "3 Years". Corrected; the figure now
carries the labels its code always asked for. -
The survival vignette described
attr(gg_brier(rf), "crps_integrated")as a
time-normalised score on the 0 to 0.25 Brier scale, then printed 1.44. The
attribute isget.brier.survival()$crps, the raw area under the Brier
curve in time units, and always has been. The vignette now says so and shows
the normalised value (crps.std, and the right edge of the running CRPS
curve); thegg_brier()help says the same. No change to any returned value. -
gg_brier()gains acrps_stdattribute,get.brier.survival()$crps.std:
the integrated CRPS divided by the largest event time, so it reads on the
Brier scale.print()andsummary()now report it as
"CRPS (time-normalized)", andsummary()labels the rawcrps_integrated
as "integrated CRPS (time units)". The value ofcrps_integratedis
unchanged. -
The regression vignette's partial dependence surface was flat in
rm. It
overwrotenewx$rmand calledgg_partial_rfsrc()once perrmvalue,
butnewxonly sets the evaluation grid andpartial.rfsrc()always
averages over the training data, so all six curves were identical. It now
holdsrmfixed throughxvar2.name, and the prose describes what the
corrected figure shows: a modest interaction, not a strong one. The
newxandxvar2.namedocumentation now says whatnewxdoes and does
not control. -
A Random Hazard Forests (RHF) visualization layer over the 'randomForestRHF'
package, added to Suggests:gg_rhf()tidies a forest's per-case hazard and
cumulative hazard over time, andgg_auct(),gg_rhf_importance()and
gg_tune_rhf()are described below.gg_auct()andgg_rhf_importance()
call 'randomForestRHF' only when no precomputed fit is supplied, and check
requireNamespace()first; the other entry points read the object they are
given. Called on anauct.rhforimportance.rhfresult rather than on the
forest, they say to pass it asauct_fit =orimportance_fit =.
plot.gg_rhf()gives each case its own colour and legend key only while
there are at most 10 cases, and draws more as one translucent bundle with no
legend. Each run of defined values in a case's start-stop path is drawn as
its own line, so an internal gap shows as a gap. No change for users who do
not install 'randomForestRHF'. -
The consistency sweep distinguishes current CRAN software versions from
supported minimum versions and standardizes the three package-qualified fit
calls and object classes:randomForestSRC::rfsrc()->rfsrc,
randomForestRHF::rhf()->rhf, andvarPro::varpro()->varpro. -
Add a longitudinal RHF vignette covering
gg_rhf(),gg_auct(),
gg_rhf_importance(), andgg_tune_rhf()from one saved analysis. -
gg_auct()/plot.gg_auct(): tidy wrapper and plot for time-varying
AUC fromrandomForestRHF::auct.rhf()(RHF Phase 2). Returns a long
frametime / auc / se / lower / upper / markerwith aniauc
attribute (Uno + standardized integrated AUC);plot.gg_auct()draws
AUC(t) with a bootstrap CI ribbon when available and a 0.5 reference
line.gg_auct.rhf(object, marker, auct_fit = NULL, method)computes
auct.rhf()internally or reuses a cached fit.methodchooses the
cumulative/dynamic (default) or incident/dynamic AUC; the result records it
asattr(, "method")and the plot names it on the y axis, since the two
curves otherwise look alike. A cachedauct_fitdecides the method, and a
methodthat contradicts it now warns rather than being dropped.
...is forwarded toauct.rhf(), sobootstrap.repgives the confidence
ribbon without precomputing the fit, and?gg_auctcarries a note on
choosing between the two definitions, which estimate different targets
rather than better and worse versions of one. -
gg_rhf_importance()/plot.gg_rhf_importance(): tidy wrapper and point
matrix for time-localized variable priority from
randomForestRHF::importance.rhf()(RHF Phase 3). It returns
variable / time_window / time / time_index / start / stop / midpoint / n_risk / n_rules / priority, accepts a suppliedimportance_fitor
calculates one when absent, and orders variables by their q90 priority over
time windows. Priority is a ranking score, not a z-score; no selection
cutoff is applied.
plot.gg_rhf_importance()takeslabels, as the plot methods below do; its
variable axis isy, so the labelled scale is the y scale, and
autoplot.gg_rhf_importance()forwards it. -
gg_tune_rhf()/plot.gg_tune_rhf(): supplied-object-only inspection of a
tune.treesize.rhftree-size tuning path. The five returned columns are
treesize / metric / value / se / selected; the plot marks the selected
size and draws an iAUC standard-error ribbon only when finite supplied iAUC
standard errors are available.gg_tune_rhf()never recalculates tuning. -
randomForestRHF (>= 2.0.3)is required in Suggests; earlier releases
inverted the cumulative/dynamicauct.rhf()curve
(kogalur/randomForestRHF#1). The pointwise hazard is defined only where a
grid point falls inside one of the case's supplied(start, stop]
intervals, and isNAin gaps and after the final stop. The cumulative
hazard isNAafter the final stop, and on 2.1.0 also from a case's first
internal gap onward, even where the hazard is defined. 'randomForestRHF'
documents it as flat through a gap;?gg_rhfand?plot.gg_rhfdescribe
what 2.1.0 returns.auct.rhf()can likewise return anNAAUC at the
final grid time, where the censoring-weight denominator is undefined once
the control set is nearly exhausted.gg_rhf()passes theseNAvalues
through unchanged, andplot.gg_rhf()andplot.gg_auct()drop them before
drawing, so a curve ends with its case's follow-up. The tests fit a forest
whose cases have several start-stop rows with gaps between them. This
resolves issue #229, where an earlier reading (a small negative hazard,
specific to the macOS arm64 binary) was wrong on both counts. -
plot.gg_partial_varpro(),plot.gg_partial(),plot.gg_vimp()and
plot.gg_varpro()gain alabelsargument for human-readable variable
names. It accepts a named character vector, a labelled data frame (reading
attr(col, "label")), or a two-columnkey/labeldata frame. Variables
with no label keep their raw name. Labels apply at draw time only — the
returned object still carries raw variable names, so downstream consumers
are unaffected. The argument reaches every branch of these methods, not just
their default one:plot.gg_varpro()honours it on both the main panel and
the class-conditional panel, andplot.gg_partial_varpro()honours it on
survival path-C objects (those extracted withscale = "surv"or"chf"),
which are handed off toplot.gg_partial_rfsrc(). -
plot.gg_beta_varpro(),plot.gg_ivarpro()andplot.gg_beta_uvarpro()
gainlabelson the same terms, completing the varPro importance family.
These three had been dropping the argument in complete silence: each declares
...and does not use it, solabelswas absorbed with no warning, no
error, and an unlabelled plot as the only symptom. Their facets are per class
rather than per variable, so the class strips are left alone and only the
variable axis is relabelled; in a faceted plot every panel is relabelled. -
plot.gg_shap()and the three exported mode functions it dispatches to,
shap_importance(),shap_beeswarm()andshap_dependence(), gain
labels. Each of the three puts variable names somewhere different, so each
honours the argument differently:shap_importance()labels a flipped
discretexscale,shap_beeswarm()labelsydirectly because it does not
flip, andshap_dependence()has no variable scale at all and substitutes
the label into both axis titles instead. In that last modexvarstill
matches on raw variable names, so the label is display only and passing a
label where a variable name belongs is still an error. As with the varPro
methods above,labelswas previously accepted and discarded in silence. -
plot.gg_variable()no longer declarestimeandtime_labels, two formals
its body never read. They are parameters ofgg_variable(), the extractor,
which bakes the horizon into the object beforeplot()runs, so the man page
had been promising a horizon selection the method never performed. Supplying
either now warns and names the call that works.⚠️ time_unitsmoved to
after...in the signature as part of this: R partial-matches argument
names only before..., so withtime_unitsahead of it a caller writing
time = 1191bound silently totime_unitsand died on its type check.
Past the dots, matching is exact.time_unitsalways had to be named, so no
working call changes. -
plot.gg_variable()sanity-checkstime_unitsagainst the data it describes. A year-like
unit supplied against values above 150 warns, because that is almost always a
forest fit on a smaller unit and produces an axis title wrong by a factor of
365. It warns rather than errors, and only in that one direction: small values
labelled"days"is ordinary, so there is no signal to check. The package
still cannot derive the unit and does not try to. Scoped to
plot.gg_variable()for now:plot.gg_rfsrc()also takestime_units, but a
gg_rfsrcobject has notimecolumn (its time points live invariable,
which holds class names for a classification fit), so there is no unambiguous
column to check and extending it is not a one-line change. -
plot.gg_variable(),plot.gg_udependent()andplot.gg_sdependent()gain
labels, which completes the argument across every plot method in the
package that renders variable names.plot.gg_variable()labels the facet strips in its panel
plot, through all three faceting branches, and the x axis title in its
individual plot; thetimefacet is untouched, because it facets by time
rather than by variable, and the multi-time survival panel scopes its
labeller to the variable dimension so a label key that collides with a time
value cannot reach the time strips.plot.gg_udependent()labels the node text of its dependency
network. There the display string is written to a separate vertex attribute
and the igraphnameis left alone, becausenameis the key the
edge-weight backfill matches on and rewriting it would break edge weights on
graphs saved before those weights were stored.plot.gg_sdependent()is the
plain case, a flipped discrete axis likeplot.gg_vimp(). -
plot.gg_vimp():lblsis deprecated in favour oflabelsand will be
removed in a future release. Its oldlength(lbls) >= length(vars)gate is
also gone, so a partial label set is now honoured, falling back to the raw
name per variable. Previously supplying fewer labels than variables silently
applied none. -
gg_partial_varpro()orders variables by varPro importance
(varPro::get.topvars()) whenobjectis supplied, andnameis now a
factor, so facets follow importance order instead of being re-sorted
alphabetically. Variables absent from the ranking keep their incoming order
and are appended after the ranked block; none are dropped. -
gg_partial_varpro():nvarsnow selects the top n by importance. It
previously took the first n elements of the partial-dependence list before
any ranking was applied, returning an arbitrary subset with no symptom in
the output. -
gg_partial_varpro()warns whenscale = "auto"cannot be resolved because
noobjectwas supplied, instead of silently falling back to the generic
"Partial Effect" axis. The fallback label itself was never wrong — it was
honest about an unknown scale — but the silence around it was, so the
fallback now says so. -
The
labelslookup now drops entries whose label or name is blank orNA,
so a variable given an empty label falls back to its raw name rather than
drawing blank axis or strip text. All three accepted input shapes now agree
on the same information; previously the labelled-data-frame arm dropped
blanks while a named vector orkey/labelframe kept them. -
gg_partial_varpro()now rejects an unnamedpart_dtawith a clear error
instead of accepting it. The names of that list are the variable
identities; without them the constructor cannot build anamecolumn at all,
and the omission used to surface two calls later as an opaquefacet_wrap()
failure about a missing faceting variable. An emptypart_dtaremains legal. -
The package's own vignettes (
ggRandomForests-regression.qmd,
ggRandomForests-survival.qmd) are moved off the now-deprecatedlbls
argument ontolabels, so the shipped examples model the current API
rather than the one being phased out. -
plot.gg_variable()andplot.gg_rfsrc()no longer hard-code a "year" time
unit in survival axis titles. The unit was never derived from the data, so a
fit measured in days --randomForestSRC::pbc, this package's own canonical
survival example, among them -- rendered "Survival at 1191 year" for a horizon
of 1191 days. The titles now read "Survival at 1191" and "time" by default,
and a newtime_unitsargument on both methods restores an explicit unit:
time_units = "days"gives "Survival at 1191 days" and "time (days)". Users
whose data really is in years should passtime_units = "years"to keep the
word. -
plot.gg_variable()'s survival branch has visual regression cover for the
first time. The branch forks onpaneland on whether the object carries one
time or several, and the four resulting paths differ in both faceting and
y-axis title; each now has avdiffrbaseline. The two single-time paths are
the ones that render a time unit into the axis title, so a change to that
title now surfaces as an SVG diff rather than resting on anexpect_equal()
ofp$labels$y, which cannot see the rest of the panel. Tests only. -
DESCRIPTIONnow declares the Quarto command line tool in
SystemRequirements. The vignettes have always needed it to build; the
field makes that visible to installers and toR CMD check. -
Add
varpro_coverage(): for each term (or variable) of a varpro fit, the
share of trees in which a release rule scored it, next to its importance z,
so a term that was tested and found unimportant can be told from one that
was never or barely tested. It counts from the same release rules as
gg_varpro(), but scores every tree by default wheregg_varpro()follows
the fit'smax.tree, so the two can report different numbers on default
calls. Optional noise columns give a cutoff by variable kind that scales
with the fit, unlike the fixed 0.79.max_untestedstops the call with an
error when more than that share of the real variables went untested, so a
screen that tested too little cannot pass for one that found no effect; for
that guard a factor counts as tested only when a single level was, while the
testedcolumn forby = "variable"pools the levels, so the two can
disagree. The default,NULL, only reports. A help section, "The first-pass
filter", explains howvarpro()'s defaultsplit.weight = TRUEandnvar = 30cut variables before any rule is built, and thatsplit.weight = FALSE,
withoutsplit.weight.custom, keeps every variable eligible (#340). -
gg_varpro()now scores the boxes, z and the newcoveragecolumn from
one set of release rules, the wayvarPro::importance()does, so they
always describe the same trees. Before, z followedmax.treepassed
through...while the boxes stayed on the fit-time trees, and a
variable with rules only outside those trees was dropped without a
warning (#340) -
gg_varpro(local.std = )now reaches varPro. It was always sent as
FALSE, so the default z was the winsorised mean over the winsorised SD
rather thanimportance()'s default. The default z, and so the set of
variables abovecutoff = 0.79, changes, and withlocal.std = TRUE
it depends on the random number stream, as in varPro: callset.seed()
first. The boxes are no longer divided by a plainsd(); with
local.std = TRUEthe per-tree values are already on z's scale. The
class-conditional z follows the same setting (#340) -
gg_varpro()reports an undefined z (a variable tested in undertrim
of the trees, withlocal.std = FALSE) asNAinstead of 0, and adds
coverageandtestedto$impand$stats.plot.gg_varpro()draws
untested variables as open boxes with a caption, so a barely-tested
variable no longer reads as "no importance".trim,max.treeand
max.rules.treeare now arguments; any other argument in..., which
used to go toimportance(), is an error (#340) -
plot.gg_varpro()no longer says it "ignores type = 'raw'" on a
conditional plot when notypewas passed -
summary()of agg_varproobject whose z values are all undefined
reports the z range as unavailable instead of[Inf, -Inf]with two
warnings (#340) -
The varPro vignette explains the open boxes
gg_varpro()draws for
untested variables (#340) -
The README lists
varpro_coverage()among the varPro functions -
The
gg_varpro()help page, its plot caption and the varPro vignette
say that coverage counts the trees in which a release rule for the
variable returned an importance value -
Add the vignette "varPro on small or sparse data": which variables
varPro actually tested, what a z of zero means, how much the trim and
the 0.79 cutoff change the answer, checking a screen against noise, and
partial dependence on small data. Document the same points in
?gg_varpro,?gg_partial_varpro(a factor is partialled one level at
a time, by its one-hot names; the spread is not a confidence interval)
and?gg_partial_rfsrc(horizons before the first event all return the
first event's curve) (#351) -
Tests now cover
varpro_coverage()on a classification fit and its
error branches: an encoding map that misses a term, and a multivariate
regression fit (#347) -
The help pages for
calc_roc(),gg_rfsrc()andgg_roc()now show the
generic call in their usage section, not only therfsrcmethod. R-devel's
R CMD checkreports exported functions with no usage line as "Exported
functions without usage information", and these three were the only ones.
No argument or return value changed. -
Dependsnow readsR (>= 4.3.0), down fromR (>= 4.4.0). The old floor
was the internal hvtiR family's policy, not anything ggRandomForests needs.
The new one is the floor ofrandomForestSRCandvarPro, the strictest of
theImports; the package code itself needs nothing past R 4.1. A new
R CMD checkleg on R 4.3 tests the floor on every push tomain
(#326). -
gg_ivarpro()files a binaryy.externalprofile under its target's name
when that is a response level, rather than always under the last level, and
the binary default view shows it. -
gg_partial_varpro()keeps each categorical variable's level order when
several are combined in$categorical$variable. The column is a factor
whose levels run through each variable's levels in turn, and it is ordered
when every categorical variable is an ordered factor. The plot keys each
panel's levels by their variable, so panels whose labels overlap, or whose
factors order the same labels differently, each keep their own order. -
The survival vignette has a new section, "How far can these curves be
trusted?", on reading partial dependence when events are sparse: thin tails,
flattening at the ends of a predictor's range, hownodesizeaffects tree
growth, and what a forest grown on a single predictor returns. -
The "varPro on small or sparse data" vignette has a new section, "What if
the events are rare?". A simulation with known signal, at 60 and 150 events,
shows that offering every variable (split.weight = FALSE) needs a smaller
mtrybefore binary predictors get tested, that more trees and rules pay
off only when there are events to use, that a real rare effect can score
near zero at 60 events while counting as tested, and that a noise variable
correlated with a signal scores like one. It ends with the settings we start
from on sparse survival data. The summaries are precomputed by
vignettes/precompute_varpro_rare.R. -
The varPro vignette no longer calls
nvara red herring. On a guided fit
(split.weight = TRUE, the default) varPro keeps only thenvarheaviest
encoded columns, 30 by default, and builds no rule for the rest, sonvar
caps which predictors compete, not just how many are reported. A factor with
more than two levels takes one column per level, so it can fill several of
those places. The vignette also says thatsparsedoes nothing once
split.weight = FALSEwhen no custom weights are given, that
split.weight.customweights override that switch (andsparsethen
reshapes them), that unguided fits try every predictor at every split
unlessmtryis set, and that an eligible predictor is not necessarily a
tested one (varpro_coverage()tells them apart). -
gg_varpro()gainsnoiseandkind_values. Name the permuted noise
columns you added before fitting (for examplenoise = "^noise"), and a
variable is selected when it is tested and its z beats the best tested noise
of its own kind, categorical or continuous, the rulevarpro_coverage()
uses. The bar comes from the same rules as the boxes and is judged before
nvartruncation.plot()then draws the noise bar in place of the 0.79
line: one line when there is a single bar, a dashed tick on each row when the
two kinds differ. Noise boxes are orange.print()andsummary()say how
the selection was made. Withoutnoise, nothing changes. Thecutoffhelp
now says that varPro uses 0.79 only to highlight its plot.
Noise is judged only on rows scored in at least one tree, sotrim = 0
cannot turn unscored noise into a bar at 0, here or invarpro_coverage().
When one kind has no tested noise and borrows the other kind's bar, both
functions warn, anoise_refcolumn records which kind set each bar, and
the plot caption says "from continuous noise". When no noise at all is
tested, both warn and fall back to a bar at 0, withnoise_refset toNA,
so a variable selected then has beaten no observed noise, only zero. -
print()on agg_varproobject names the forest family once. The header
already carries it, and the method printed it a second time. -
The vignettes restore the
mc.coresandrf.coresoptions they set to keep
their fits to one core, as CRAN asks of vignettes that change options. -
Two plot methods take their arguments in a new order, which matters only to
a call that passes them by position. Inplot.gg_variable()the third
argument is nowpanel, where in 3.5.5 it wastimeandpanelwas fifth;
oobandpointsmove up two places with it. In
plot.gg_partial_varpro()the third argument is nowlabels, where in 3.5.5
it fell into.... Calls that name their arguments, as the examples do, are
unchanged.