class_docstr: Polynomial smoother up to a given order.
  Fit based on weighted least squares.
  
  The x values can be specified at instantiation or when called.
  
  This is a 3 liner with OLS or WLS, see test.
  It's here as a test smoother for GAM
class_docstr_tok: ["Polynomial","smoother","up","to","a","given","order",".","Fit","based","on","weighted","least","squares",".","The","x","values","can","be","specified","at","instantiation","or","when","called",".","This","is","a","3","liner","with","OLS","or","WLS",",","see","test",".","It","'s","here","as","a","test","smoother","for","GAM"]
code: def predict(self, x=None):
      if x is not None:
          # if x.ndim > 1: x=x[0,:]  #why this this should select column not row
          if x.ndim > 1:
              print(
                  "Warning: 2d x detected in PolySmoother predict, shape:",
                  x.shape,
              )
              x = x[:, 0]  # TODO: check and clean this up
          X = np.array([(x**i) for i in range(self.order + 1)])
      else:
          X = self.X
      # return np.squeeze(np.dot(X.T, self.coef))
      # need to check what dimension this is supposed to be
      if X.shape[1] == self.coef.shape[0]:
          return np.squeeze(np.dot(X, self.coef))  # [0]
      else:
          return np.squeeze(np.dot(X.T, self.coef))
  
file_path: statsmodels/statsmodels/sandbox/nonparametric/smoothers.py
imports: import numpy
  from .None import kernels
label_desc: Use image node_id 8 for calling the PolySmoother obj's underlying member method code with example usage: obj.predict(x) and returns: np, np