class_docstr: Single index semiparametric model ``y = g(X * b) + e``.
  
  Parameters
  ----------
  endog : array_like
      The dependent variable
  exog : array_like
      The independent variable(s)
  var_type : str
      The type of variables in X:
  
          - c: continuous
          - o: ordered
          - u: unordered
  
  Attributes
  ----------
  b : array_like
      The linear coefficients b (betas)
  bw : array_like
      Bandwidths
  
  Methods
  -------
  fit(): Computes the fitted values ``E[Y|X] = g(X * b)``
         and the marginal effects ``dY/dX``.
  
  References
  ----------
  See chapter on semiparametric models in [1]
  
  Notes
  -----
  This model resembles the binary choice models. The user knows
  that X and b interact linearly, but ``g(X * b)`` is unknown.
  In the parametric binary choice models the user usually assumes
  some distribution of g() such as normal or logistic.
code: def cv_loo(self, params):
      # See p. 254 in Textbook
      params = np.asarray(params)
      b = params[0 : self.K]
      bw = params[self.K :]
      LOO_X = LeaveOneOut(self.exog)
      LOO_Y = LeaveOneOut(self.endog).__iter__()
      L = 0
      for i, X_not_i in enumerate(LOO_X):
          Y = next(LOO_Y)
          # print b.shape, np.dot(self.exog[i:i+1, :], b).shape, bw,
          G = self.func(
              bw,
              endog=Y,
              exog=-np.dot(X_not_i, b)[:, None],
              # data_predict=-b*self.exog[i, :])[0]
              data_predict=-np.dot(self.exog[i : i + 1, :], b),
          )[0]
          # print G.shape
          L += (self.endog[i] - G) ** 2
  
      # Note: There might be a way to vectorize this. See p.72 in [1]
      return L / self.nobs
  
imports: import numpy
  from scipy import optimize
  from scipy.stats.mstats import mquantiles
  from statsmodels.nonparametric.api import KDEMultivariate, KernelReg
  from statsmodels.nonparametric._kernel_base import gpke, LeaveOneOut, _get_type_pos, _adjust_shape
label_desc: Use image node_id 3 for calling the SingleIndexModel obj's underlying member method code with example usage: obj.cv_loo(params) and returns: unknown