Skip to content

Release 3.1.2: #118 gg_varpro fix + unsupervised varPro wrappers#121

Open
ehrlinger wants to merge 2 commits into
mainfrom
fix/118-gg-varpro-empty-importance
Open

Release 3.1.2: #118 gg_varpro fix + unsupervised varPro wrappers#121
ehrlinger wants to merge 2 commits into
mainfrom
fix/118-gg-varpro-empty-importance

Conversation

@ehrlinger

@ehrlinger ehrlinger commented Jun 12, 2026

Copy link
Copy Markdown
Owner

ggRandomForests 3.1.2 — bundles the #118 fix and the unsupervised varPro wrappers (folded in from #120, per the decision to ship both in 3.1.2).

Contents

1. Fix #118gg_varpro() empty importance
gg_varpro() failed with the cryptic "arguments imply differing number of rows:

, 0" when varPro::importance() returns a degenerate table (0 rows, or p rows with no z column — seen intermittently on survival fits). A scoped guard in .build_varpro_imp_dfs() now stops with a clear, specific message. Not a survival-family block (cf. reverted #116). Closes #118.

2. gg_beta_uvarpro() — tidy wrapper + plot/print/summary/autoplot for varPro::get.beta.entropy() (unsupervised lasso importance; analogue of gg_beta_varpro()).

3. gg_sdependent() — tidy wrapper + plot/print/summary/autoplot for varPro::sdependent() signal-variable detection (imp_score / degree / signal), complementing gg_udependent()'s graph.

Tests / quality

  • All new tests CRAN-safe (constructed importance/entropy matrices, no varPro grow) + skip_on_cran live-integration cases.
  • lint_package() = 0; version-sync test green; DESCRIPTION + NEWS bumped to 3.1.2.

Base

Stacked on the 3.1.1 branch (fix/cran-ubsan-varpro-skip) for a clean diff. Retarget to main once #119 (3.1.1) merges.

Supersedes #120 (which targeted dev); the v4.0.0/dev line picks these up when it next syncs main.

🤖 Generated with Claude Code

@codecov

codecov Bot commented Jun 12, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.42647% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.71%. Comparing base (168bd7c) to head (4d23f4f).

Files with missing lines Patch % Lines
R/gg_beta_uvarpro.R 97.05% 3 Missing ⚠️
R/gg_sdependent.R 96.34% 3 Missing ⚠️
R/plot.gg_beta_uvarpro.R 97.61% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #121      +/-   ##
==========================================
+ Coverage   87.04%   87.71%   +0.66%     
==========================================
  Files          44       48       +4     
  Lines        3938     4208     +270     
==========================================
+ Hits         3428     3691     +263     
- Misses        510      517       +7     
Files with missing lines Coverage Δ
R/gg_varpro.R 100.00% <100.00%> (ø)
R/plot.gg_sdependent.R 100.00% <100.00%> (ø)
R/plot.gg_beta_uvarpro.R 97.61% <97.61%> (ø)
R/gg_beta_uvarpro.R 97.05% <97.05%> (ø)
R/gg_sdependent.R 96.34% <96.34%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ehrlinger ehrlinger changed the title fix(#118): clear error when varPro importance() returns empty (v3.1.2) Release 3.1.2: #118 gg_varpro fix + unsupervised varPro wrappers Jun 12, 2026
ehrlinger and others added 2 commits June 12, 2026 12:36
gg_varpro() failed with the cryptic "arguments imply differing number of
rows: <p>, 0" when varPro::importance() returns a degenerate importance
table — 0 rows, or p named variables with no usable `z` column — observed
intermittently on survival fits where the release-rule step selects no
variables. .build_varpro_imp_dfs() now detects that (length(z) !=
length(vars), or 0 vars) and stops with a clear, specific message
suggesting a larger ntree.

Scoped to the degenerate case only: well-formed fits (survival included)
have length(z) == length(vars) > 0 and are unaffected. This is NOT a
blanket survival-family block (cf. the reverted #116).

Tests exercise the guard via the internal with a constructed importance
table (CRAN-safe, no varPro grow), including a positive case proving the
working path is preserved. Version bump to 3.1.2 (DESCRIPTION + NEWS).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Fold the unsupervised varPro wrappers (originally PR #120 on dev) into the
3.1.2 release line alongside the #118 fix:

- gg_beta_uvarpro() / plot/print/summary/autoplot: tidy wrapper for
  varPro::get.beta.entropy() (unsupervised lasso importance), the analogue
  of gg_beta_varpro(); colMeans(|beta|) per variable + cutoff/selected, with
  a precomputed beta_fit cache path.
- gg_sdependent() / plot/print/summary/autoplot: tidy wrapper for
  varPro::sdependent() signal-variable detection (imp_score / degree /
  signal flag), complementing gg_udependent()'s graph. Frame-building split
  into .gg_sdependent_build() to keep cyclomatic complexity under the lint
  cap.

Tests are CRAN-safe (constructed matrices, no varPro grow) with skip_on_cran
live-integration cases. lint_package() = 0; NEWS entries under v3.1.2.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@ehrlinger ehrlinger force-pushed the fix/118-gg-varpro-empty-importance branch from 51e9c0b to 4d23f4f Compare June 12, 2026 16:37
@ehrlinger ehrlinger changed the base branch from fix/cran-ubsan-varpro-skip to main June 12, 2026 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

gg_varpro(): intermittent failure on survival fits — varPro importance() returns 0 rows

1 participant