Skip to content

Commit

Permalink
Missed a few other places where polytype/scaler were.
Browse files Browse the repository at this point in the history
  • Loading branch information
thequackdaddy committed Nov 4, 2016
1 parent 09078cc commit 2f9b292
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions patsy/polynomials.py
Expand Up @@ -75,7 +75,7 @@ def memorize_finish(self):
raw_poly = self.vander(scores, n)
self.alpha, self.norm, self.beta = self.gen_qr(raw_poly, n)

def transform(self, x, degree=3, polytype='poly', raw=False, scaler=None):
def transform(self, x, degree=3, raw=False):
if have_pandas:
if isinstance(x, (pandas.Series, pandas.DataFrame)):
to_pandas = True
Expand All @@ -87,14 +87,11 @@ def transform(self, x, degree=3, polytype='poly', raw=False, scaler=None):
x = np.array(x, ndmin=1).flatten()

n = self.degree
p = self.vander(x, n, self.polytype)
p = self.vander(x, n)

if self.scaler == 'qr':
if not self.raw:
p = self.apply_qr(p, n, self.alpha, self.norm, self.beta)

if self.scaler == 'standardize':
p = self.apply_standardize(p, self.mean, self.var)

p = p[:, 1:]
if to_pandas:
p = pandas.DataFrame(p)
Expand Down

0 comments on commit 2f9b292

Please sign in to comment.