class_docstr: Nonparametric kernel regression class.
  
  Calculates the conditional mean ``E[y|X]`` where ``y = g(X) + e``.
  Note that the "local constant" type of regression provided here is also
  known as Nadaraya-Watson kernel regression; "local linear" is an extension
  of that which suffers less from bias issues at the edge of the support. Note
  that specifying a custom kernel works only with "local linear" kernel
  regression. For example, a custom ``tricube`` kernel yields LOESS regression.
  
  Parameters
  ----------
  endog : array_like
      This is the dependent variable.
  exog : array_like
      The training data for the independent variable(s)
      Each element in the list is a separate variable
  var_type : str
      The type of the variables, one character per variable:
  
          - c: continuous
          - u: unordered (discrete)
          - o: ordered (discrete)
  
  reg_type : {'lc', 'll'}, optional
      Type of regression estimator. 'lc' means local constant and
      'll' local Linear estimator.  Default is 'll'
  bw : str or array_like, optional
      Either a user-specified bandwidth or the method for bandwidth
      selection. If a string, valid values are 'cv_ls' (least-squares
      cross-validation) and 'aic' (AIC Hurvich bandwidth estimation).
      Default is 'cv_ls'. User specified bandwidth must have as many
      entries as the number of variables.
  ckertype : str, optional
      The kernel used for the continuous variables.
  okertype : str, optional
      The kernel used for the ordered discrete variables.
  ukertype : str, optional
      The kernel used for the unordered discrete variables.
  defaults : EstimatorSettings instance, optional
      The default values for the efficient bandwidth estimation.
  
  Attributes
  ----------
  bw : array_like
      The bandwidth parameters.
docstr: Computes the AIC Hurvich criteria for the estimation of the bandwidth.
  
  Parameters
  ----------
  bw : str or array_like
      See the ``bw`` parameter of `KernelReg` for details.
  
  Returns
  -------
  aic : ndarray
      The AIC Hurvich criteria, one element for each variable.
  func : None
      Unused here, needed in signature because it's used in `cv_loo`.
  
  References
  ----------
  See ch.2 in [1] and p.35 in [2].
code: def aic_hurvich(self, bw, func=None):
      """
      Computes the AIC Hurvich criteria for the estimation of the bandwidth.
  
      Parameters
      ----------
      bw : str or array_like
          See the ``bw`` parameter of `KernelReg` for details.
  
      Returns
      -------
      aic : ndarray
          The AIC Hurvich criteria, one element for each variable.
      func : None
          Unused here, needed in signature because it's used in `cv_loo`.
  
      References
      ----------
      See ch.2 in [1] and p.35 in [2].
      """
      H = np.empty((self.nobs, self.nobs))
      for j in range(self.nobs):
          H[:, j] = gpke(
              bw,
              data=self.exog,
              data_predict=self.exog[j, :],
              ckertype=self.ckertype,
              ukertype=self.ukertype,
              okertype=self.okertype,
              var_type=self.var_type,
              tosum=False,
          )
  
      denom = H.sum(axis=1)
      H = H / denom
      gx = KernelReg(
          endog=self.endog,
          exog=self.exog,
          var_type=self.var_type,
          reg_type=self.reg_type,
          bw=bw,
          defaults=EstimatorSettings(efficient=False),
      ).fit()[0]
      gx = np.reshape(gx, (self.nobs, 1))
      sigma = ((self.endog - gx) ** 2).sum(axis=0) / float(self.nobs)
  
      frac = (1 + np.trace(H) / float(self.nobs)) / (
          1 - (np.trace(H) + 2) / float(self.nobs)
      )
      # siga = np.dot(self.endog.T, (I - H).T)
      # sigb = np.dot((I - H), self.endog)
      # sigma = np.dot(siga, sigb) / float(self.nobs)
      aic = np.log(sigma) + frac
      return aic
  
imports: import copy
  import numpy
  from scipy import optimize
  from scipy.stats.mstats import mquantiles
  from ._kernel_base import GenericKDE, EstimatorSettings, gpke, LeaveOneOut, _get_type_pos, _adjust_shape, _compute_min_std_IQR, kernel_func
label_desc: Use image node_id 5 for calling the KernelReg obj's underlying member method code with example usage: obj.aic_hurvich(bw, func) and returns: aic