class_docstr: Wrap a statsmodels GLM as a sklearn (fake) BaseEstimator for YellowBrick.
  
  Examples
  --------
  First import the external libraries and helper utilities:
  
  >>> import statsmodels.api as sm
  >>> from functools import partial
  
  Instantiate a partial with the statsmodels API:
  
  >>> glm_gaussian_partial = partial(sm.GLM, family=sm.families.Gaussian())
  >>> sm_est = StatsModelsWrapper(glm_gaussian_partial)
  
  Create a Yellowbrick visualizer to visualize prediction error:
  
  >>> visualizer = PredictionError(sm_est)
  >>> visualizer.fit(X_train, y_train)
  >>> visualizer.score(X_test, y_test)
  
  For statsmodels usage, calling .summary() etc:
  
  >>> gaussian_model = glm_gaussian_partial(y_train, X_train)
  
  Notes
  -----
  .. note:: This wrapper is trivial, options and extra things like weights
      are not currently handled.
code: def __init__(
      self,
      glm_partial,
      stated_estimator_type="regressor",
      scorer=r2_score,
  ):
      # YellowBrick checks the attribute to see if it is a
      # regressor/clusterer/classifier
      self._estimator_type = stated_estimator_type
  
      # assume user passes in a partial which we can instantiate later
      self.glm_partial = glm_partial
  
      # needs a default scoring function, regression uses r^2 in sklearn
      self.scorer = scorer
  
file_path: yellowbrick/yellowbrick/contrib/statsmodels/base.py
imports: from sklearn.metrics import r2_score
  from sklearn.base import BaseEstimator
label_desc: Use image node_id 1 to create a new StatsModelsWrapper object from inherited base classes: BaseEstimator with example: obj = StatsModelsWrapper(glm_partial, stated_estimator_type, scorer)