Repository navigation
docs: varPro on small or sparse data vignette - #351
Merged
Merged
Conversation
A companion to the varPro vignette, on the full PBC data with ten permuted noise columns. It shows which variables varPro actually tested (varpro_coverage(): eligible, tested, untested), what a z of zero means (winsorising pulls a rarely scored term to exactly 0), how much the trim and the 0.79 cutoff change the answer (little and a lot), checking a screen against noise of each kind, and what partial dependence can say on small data: the spread is not a confidence interval (five subsample refits shown), survival horizons snap to event times (requests before the first death all return its curve), and a factor is partialled one level at a time by its one-hot names. That section also notes the label-order bug fixed in #350 and varPro's remaining caveat: partialpro() leaves a factor's other level columns set, which here moves the stage 4 partial by 0.003. Every fit is precomputed (precompute_varpro_small.R), so the R CMD check rebuild grows no forest. varpro.qmd gains a short section pointing to the new vignette and corrects how the importance plot is ordered (median) versus highlighted (z). ?gg_varpro, ?gg_partial_varpro and ?gg_partial_rfsrc document the same points. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- _pkgdown.yml: list varpro-small-data in the articles index (pkgdown requires every vignette there; check_pkgdown() now clean). - Vignette: the attribution sentence no longer says every behaviour is upstream; the label bug, clamping and coverage rule are ggRF's own. - ?gg_partial_varpro: the multi-level check sentence stands on its own. - NEWS (#350): $categorical$variable now holds $xvirtual values. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #351 +/- ##
=======================================
Coverage 91.48% 91.48%
=======================================
Files 61 61
Lines 6180 6180
=======================================
Hits 5654 5654
Misses 526 526
🚀 New features to boost your workflow:
|
- z = 0 is ambiguous: low coverage forces it, but a fully tested term whose compared outcome means agree also gets 0. Read coverage beside z. - Untested trees pull the box toward 0 as coverage falls; they do not make every box start at 0 (vignette and ?gg_varpro). - partialpro() samples training cases uniformly, builds virtual twins and filters them by support; importance rules do not select the cases. - The local and marginal panels come from different forests; say so, and point to gg_partial_rfsrc(vp$rf) to separate method from fit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the vignette "varPro on small or sparse data" (linked from
varpro.qmd), carrying the findings of the AVSD virtual-twins varPro screen into the package docs. Follows #340, #341 and #350.What it covers (PBC plus 10 permuted noise columns)
trim = 0.1clamps, it does not drop); an untested tree contributes 0, so a term tested in fewer than about 10% of trees gets z = 0. Zero means untested, not unimportant.varpro_coverage(), and how the defaults (max.tree,max.rules.tree, guided split weights,nvar) limit it on small data.Also
?gg_varpro; "Factors, bands and small data" in?gg_partial_varpro; a first-event note in?gg_partial_rfsrc.vignettes/precompute_varpro_small.Rwritesvarpro_small_precomputed.rds(23 KB), so the vignette rebuild stays cheap._pkgdown.ymlarticle entry; news fragmentnews/docs-varpro-small-data.md. No version bump.Verification (on 8420595, rebased on 3376c19)
devtools::document(): clean. lintr: 0 lints.NOT_CRAN=true VDIFFR_RUN_TESTS=true devtools::test(): 0 failures, 0 errors, no snapshot changes.R CMD check --as-cranwith the manual, from agit archivebuild: Status 1 NOTE (CRAN incoming feasibility, update frequency). Examples with--run-donttest32s, tests 20s, vignette rebuild 50s.🤖 Generated with Claude Code