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 __init__(self, order, x=None):
      # order = 4 # set this because we get knots instead of order
      self.order = order
  
      # print order, x.shape
      self.coef = np.zeros((order + 1,), np.float64)
      if x is not None:
          if x.ndim > 1:
              print(
                  "Warning: 2d x detected in PolySmoother init, shape:",
                  x.shape,
              )
              x = x[0, :]  # check orientation
          self.X = np.array([x**i for i in range(order + 1)]).T
  
file_path: statsmodels/statsmodels/sandbox/nonparametric/smoothers.py
imports: import numpy
  from .None import kernels
label_desc: Use image node_id 1 to create a new PolySmoother object  with example: obj = PolySmoother(order, x)