class_docstr: Generic 1D Kernel object.
  Can be constructed by selecting a standard named Kernel,
  or providing a lambda expression and domain.
  The domain allows some algorithms to run faster for finite domain kernels.
class_docstr_tok: ["Generic","1D","Kernel","object",".","Can","be","constructed","by","selecting","a","standard","named","Kernel",",","or","providing","a","lambda","expression","and","domain",".","The","domain","allows","some","algorithms","to","run","faster","for","finite","domain","kernels","."]
docstr: Returns the kernel smoothing estimate of the variance at point x.
          
code: def smoothvar(self, xs, ys, x):
      """Returns the kernel smoothing estimate of the variance at point x."""
      xs, ys = self.in_domain(xs, ys, x)
  
      if len(xs) > 0:
          fittedvals = np.array([self.smooth(xs, ys, xx) for xx in xs])
          sqresid = square(subtract(ys, fittedvals))
          w = np.sum(self((xs - x) / self.h))
          v = np.sum(
              [
                  rr * self((xx - x) / self.h)
                  for xx, rr in zip(xs, sqresid)
              ]
          )
          return v / w
      else:
          return np.nan
  
imports: from statsmodels.compat.python import lzip, lfilter
  import numpy
  import scipy.integrate
  from scipy.special import factorial
  from numpy import exp, multiply, square, divide, subtract, inf
label_desc: Use image node_id 9 for calling the CustomKernel obj's underlying member method code with example usage: obj.smoothvar(xs, ys, x) and returns: unknown, np