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 fit(self, data_predict=None):
      if data_predict is None:
          data_predict = self.exog
      else:
          data_predict = _adjust_shape(data_predict, self.K)
  
      N_data_predict = np.shape(data_predict)[0]
      mean = np.empty((N_data_predict,))
      mfx = np.empty((N_data_predict, self.K))
      for i in range(N_data_predict):
          mean_mfx = self.func(
              self.bw,
              self.endog,
              np.dot(self.exog, self.b)[:, None],
              data_predict=np.dot(data_predict[i : i + 1, :], self.b),
          )
          mean[i] = mean_mfx[0]
          mfx_c = np.squeeze(mean_mfx[1])
          mfx[i, :] = mfx_c
  
      return mean, mfx
  
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 4 for calling the SingleIndexModel obj's underlying member method code with example usage: obj.fit(data_predict) and returns: mean,  mfx