Skip to content

Expose xprobe_fraction parameter on VBPCA constructor#98

Merged
jc-macdonald merged 1 commit into
mainfrom
feature/issue-78-xprobe-fraction
Apr 13, 2026
Merged

Expose xprobe_fraction parameter on VBPCA constructor#98
jc-macdonald merged 1 commit into
mainfrom
feature/issue-78-xprobe-fraction

Conversation

@jc-macdonald
Copy link
Copy Markdown
Collaborator

Summary

Add an xprobe_fraction parameter to VBPCA.__init__ (default 0.0 for backward compatibility). When set to a positive value, fit() automatically holds out that fraction of observed entries as probe data, eliminating the need to manually import and call make_xprobe_mask.

Changes

  • _missing.py: Add make_xprobe_mask() utility with dense and sparse support, split into _xprobe_dense / _xprobe_sparse helpers
  • estimators.py: Add xprobe_fraction to constructor; auto-generate probe in fit() when xprobe_fraction > 0 and no explicit xprobe is passed
  • __init__.py: Export make_xprobe_mask from package
  • test_missing.py: 4 tests for make_xprobe_mask (dense basic, existing NaNs, sparse, bad fraction)
  • test_estimators.py: 4 tests for xprobe_fraction (default, auto-gen, precedence, disabled)

Validation

just ci passes (format, lint, typecheck, 90.11% coverage, 445 tests).

Closes #78

- Add make_xprobe_mask utility in _missing.py (dense + sparse)
- Add xprobe_fraction parameter to VBPCA.__init__ (default 0.0)
- Auto-generate probe mask in fit() when xprobe_fraction > 0
- Export make_xprobe_mask from package __init__.py
- Add tests for make_xprobe_mask (dense, sparse, NaN, validation)
- Add tests for xprobe_fraction on VBPCA (default, auto-gen, precedence)

Closes #78
@jc-macdonald jc-macdonald merged commit 264c1cc into main Apr 13, 2026
7 checks passed
@jc-macdonald jc-macdonald deleted the feature/issue-78-xprobe-fraction branch April 13, 2026 20:39
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.

Expose xprobe_fraction parameter on VBPCA constructor

1 participant