diff --git a/docs/plot_parity_policy.md b/docs/plot_parity_policy.md index d4e29555..d1404e9e 100644 --- a/docs/plot_parity_policy.md +++ b/docs/plot_parity_policy.md @@ -54,9 +54,20 @@ When a ported function has an R `plot` argument, the Python function keeps its value-only **return** contract (parity asserts only on the returned value). As a side effect, passing `plot=True` renders a Matplotlib figure through the `nns.plotting` layer — `nns_reg`, `nns_m_reg`, `nns_arma`, `nns_arma_optim`, -`nns_cdf`, and `nns_seas` are wired this way (plus `residual_plot=True` for the -regression functions). The figures are color/element-faithful but never -pixel-compared, and computation with the default `plot=False` opens no figure. +`nns_cdf`, and `nns_seas` are wired this way (plus an explicit +`residual_plot=True` for the regression functions). The figures are +color/element-faithful but never pixel-compared. Every plotting flag — +`plot`, `plot_regions`, and `residual_plot` on both `nns_reg` and `nns_m_reg` +— defaults to `False`, so computation opens no figure unless a flag is set +explicitly. + +This matters for the composed estimators. `nns_boost`, `nns_stack`, +`nns_var`, and any other function that calls `nns_reg`/`nns_m_reg` internally +never pass a plotting flag, so they open no figures during fitting — even when +they invoke the regression core hundreds of times. `nns_reg` forwards its own +`plot`/`residual_plot` flags down to `nns_m_reg` on the multivariate path, so +the caller's flags (default `False`) are the single source of truth and the +multivariate core never plots on its own default. ## Inventory of committed graphics artifacts diff --git a/src/nns/multivariate_regression.py b/src/nns/multivariate_regression.py index f699691e..cf0ca5ff 100644 --- a/src/nns/multivariate_regression.py +++ b/src/nns/multivariate_regression.py @@ -29,7 +29,7 @@ def nns_m_reg( point_est: NDArray[np.float64] | None = None, point_only: bool = False, plot: bool = False, - residual_plot: bool = True, + residual_plot: bool = False, location: object | None = None, noise_reduction: NoiseReduction = "off", dist: str = "L2", diff --git a/src/nns/regression.py b/src/nns/regression.py index 711ee71c..1a6b2493 100644 --- a/src/nns/regression.py +++ b/src/nns/regression.py @@ -121,10 +121,8 @@ def nns_reg( dist=dist, confidence_interval=confidence_interval, class_levels=class_levels, - ) - _maybe_render_reg( - result, plot=plot, plot_regions=plot_regions, - residual_plot=residual_plot, point_est=point_est, + plot=plot, + residual_plot=residual_plot, ) return result