class_docstr: Nonparametric censored regression.
  
  Calculates the conditional mean ``E[y|X]`` where ``y = g(X) + e``,
  where y is left-censored.  Left censored variable Y is defined as
  ``Y = min {Y', L}`` where ``L`` is the value at which ``Y`` is censored
  and ``Y'`` is the true value of the variable.
  
  Parameters
  ----------
  endog : list with one element which is array_like
      This is the dependent variable.
  exog : list
      The training data for the independent variable(s)
      Each element in the list is a separate variable
  dep_type : str
      The type of the dependent variable(s)
      c: Continuous
      u: Unordered (Discrete)
      o: Ordered (Discrete)
  reg_type : str
      Type of regression estimator
      lc: Local Constant Estimator
      ll: Local Linear Estimator
  bw : array_like
      Either a user-specified bandwidth or
      the method for bandwidth selection.
      cv_ls: cross-validation least squares
      aic: AIC Hurvich Estimator
  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.
  censor_val : float
      Value at which the dependent variable is censored
  defaults : EstimatorSettings instance, optional
      The default values for the efficient bandwidth estimation
  
  Attributes
  ----------
  bw : array_like
      The bandwidth parameters
docstr: Local linear estimator of g(x) in the regression ``y = g(x) + e``.
  
  Parameters
  ----------
  bw : array_like
      Vector of bandwidth value(s)
  endog : 1D array_like
      The dependent variable
  exog : 1D or 2D array_like
      The independent variable(s)
  data_predict : 1D array_like of length K, where K is
      the number of variables. The point at which
      the density is estimated
  
  Returns
  -------
  D_x : array_like
      The value of the conditional mean at data_predict
  
  Notes
  -----
  See p. 81 in [1] and p.38 in [2] for the formulas
  Unlike other methods, this one requires that data_predict be 1D
code: def _est_loc_linear(self, bw, endog, exog, data_predict, W):
      """
      Local linear estimator of g(x) in the regression ``y = g(x) + e``.
  
      Parameters
      ----------
      bw : array_like
          Vector of bandwidth value(s)
      endog : 1D array_like
          The dependent variable
      exog : 1D or 2D array_like
          The independent variable(s)
      data_predict : 1D array_like of length K, where K is
          the number of variables. The point at which
          the density is estimated
  
      Returns
      -------
      D_x : array_like
          The value of the conditional mean at data_predict
  
      Notes
      -----
      See p. 81 in [1] and p.38 in [2] for the formulas
      Unlike other methods, this one requires that data_predict be 1D
      """
      nobs, k_vars = exog.shape
      ker = gpke(
          bw,
          data=exog,
          data_predict=data_predict,
          var_type=self.var_type,
          ckertype=self.ckertype,
          ukertype=self.ukertype,
          okertype=self.okertype,
          tosum=False,
      )
      # Create the matrix on p.492 in [7], after the multiplication w/ K_h,ij
      # See also p. 38 in [2]
  
      # Convert ker to a 2-D array to make matrix operations below work
      ker = W * ker[:, np.newaxis]
  
      M12 = exog - data_predict
      M22 = np.dot(M12.T, M12 * ker)
      M12 = (M12 * ker).sum(axis=0)
      M = np.empty((k_vars + 1, k_vars + 1))
      M[0, 0] = ker.sum()
      M[0, 1:] = M12
      M[1:, 0] = M12
      M[1:, 1:] = M22
  
      ker_endog = ker * endog
      V = np.empty((k_vars + 1, 1))
      V[0, 0] = ker_endog.sum()
      V[1:, 0] = ((exog - data_predict) * ker_endog).sum(axis=0)
  
      mean_mfx = np.dot(np.linalg.pinv(M), V)
      mean = mean_mfx[0]
      mfx = mean_mfx[1:, :]
      return mean, mfx
  
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 4 for calling the KernelCensoredReg obj's underlying member method code with example usage: obj._est_loc_linear(bw, endog, exog, data_predict, W) and returns: mean,  mfx