From 0ed182f0f61a5cb29935fb69fafa2d033c3aea88 Mon Sep 17 00:00:00 2001 From: Jonathan Taylor Date: Wed, 15 Sep 2021 13:19:43 -0700 Subject: [PATCH] undoing centering --- pygam/pygam.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pygam/pygam.py b/pygam/pygam.py index bcb43f0a..c0a4e96e 100644 --- a/pygam/pygam.py +++ b/pygam/pygam.py @@ -1566,9 +1566,8 @@ def partial_dependence(self, term, X=None, width=None, quantiles=None, modelmat = self._modelmat(X, term=term) pdep = self._linear_predictor(modelmat=modelmat, term=term) - pdep_mean = np.mean(pdep) - out = [pdep - pdep_mean] - + out = [pdep] + compute_quantiles = (width is not None) or (quantiles is not None) if compute_quantiles: conf_intervals = self._get_quantiles(X, width=width, @@ -1578,7 +1577,7 @@ def partial_dependence(self, term, X=None, width=None, quantiles=None, term=term, xform=False) - out += [conf_intervals - pdep_mean] + out += [conf_intervals] if meshgrid: for i, array in enumerate(out):