Fix plotting flag defaults and propagation in regression functions - #31
Merged
Conversation
nns_reg's 2-D path dispatched to nns_m_reg without forwarding the plot flags, so nns_m_reg fell back to its own residual_plot=True default and opened a residual matplot on every call. boost/stack/var invoke the regression core many times during fitting, so this leaked a flurry of background figures despite nns_reg defaulting to plot=False. Forward plot/residual_plot from nns_reg into nns_m_reg so the caller's flags govern, and flip nns_m_reg's residual_plot default to False so the documented "default plot=False opens no figure" contract actually holds for the multivariate path and any internal caller.
OVVO-Financial
added a commit
that referenced
this pull request
Jun 15, 2026
Release 1.0.4: version bump (missed by PR #31)
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
This PR fixes the plotting behavior in regression functions to ensure consistent defaults and proper flag propagation through the function call stack. The changes ensure that composed estimators (
nns_boost,nns_stack,nns_var, etc.) never open figures during fitting unless explicitly requested by the caller.Key Changes
nns_m_regdefault:residual_plotnow defaults toFalseinstead ofTrue, making it consistent with other plotting flagsnns_regnow explicitly passesplotandresidual_plotflags tonns_m_regon the multivariate path, ensuring caller intent is preserved_maybe_render_reg()call innns_reg, consolidating rendering logicFalseand how composed estimators inherit this behaviorImplementation Details
The key insight is that
nns_regforwards its own plotting flags down tonns_m_reg, making the caller's flags (which default toFalse) the single source of truth. This prevents composed estimators from inadvertently opening figures when they callnns_reg/nns_m_reginternally, even across hundreds of iterations. The multivariate core now respects the caller's explicit intent rather than having its own independent default.https://claude.ai/code/session_01SCN3z9NTc2iBZKWX4XMWTu