code: def test_pipeline(self):
      from sklearn.feature_selection import SelectKBest
      from sklearn.feature_selection import f_regression
      from sklearn.pipeline import Pipeline
  
      diabetes = datasets.load_diabetes()
      models = ["OLS", "GLS", "WLS", "GLSAR", "QuantReg", "GLM", "RLM"]
  
      for model in models:
          klass = getattr(sm, model)
  
          selector = SelectKBest(f_regression, k=5)
          estimator = Pipeline(
              [
                  ("selector", selector),
                  ("reg", base.StatsModelsRegressor(klass)),
              ]
          )
  
          estimator.fit(diabetes.data, diabetes.target)
          result = estimator.predict(diabetes.data)
  
          data = SelectKBest(f_regression, k=5).fit_transform(
              diabetes.data, diabetes.target
          )
          expected = klass(diabetes.target, data).fit().predict(data)
          self.assert_numpy_array_almost_equal(result, expected)
  
file_path: pandas-ml/pandas_ml/smaccessors/test/test_base.py
imports: import pytest
  import numpy
  import sklearn.datasets
  import statsmodels.api
  import pandas_ml.smaccessors.base
  import pandas_ml.util.testing
label_desc: Use image node_id 7 for calling the TestBaseRegressor obj's underlying member method code with example usage: obj.test_pipeline() without return types