Expose xprobe_fraction parameter on VBPCA constructor#98
Merged
Conversation
- 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
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.
Summary
Add an
xprobe_fractionparameter toVBPCA.__init__(default0.0for 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 callmake_xprobe_mask.Changes
_missing.py: Addmake_xprobe_mask()utility with dense and sparse support, split into_xprobe_dense/_xprobe_sparsehelpersestimators.py: Addxprobe_fractionto constructor; auto-generate probe infit()whenxprobe_fraction > 0and no explicitxprobeis passed__init__.py: Exportmake_xprobe_maskfrom packagetest_missing.py: 4 tests formake_xprobe_mask(dense basic, existing NaNs, sparse, bad fraction)test_estimators.py: 4 tests forxprobe_fraction(default, auto-gen, precedence, disabled)Validation
just cipasses (format, lint, typecheck, 90.11% coverage, 445 tests).Closes #78