Skip to content

Commit

Permalink
undoing centering
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathan-taylor committed Sep 15, 2021
1 parent 8bf17ad commit 0ed182f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions pygam/pygam.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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):
Expand Down

0 comments on commit 0ed182f

Please sign in to comment.