code: def test_XGBRegressor(self):
      # http://scikit-learn.org/stable/auto_examples/plot_kernel_ridge_regression.html
      X = 5 * np.random.rand(1000, 1)
      y = np.sin(X).ravel()
  
      # Add noise to targets
      y[::5] += 3 * (0.5 - np.random.rand(X.shape[0] // 5))
  
      df = pdml.ModelFrame(data=X, target=y)
  
      models = ["XGBRegressor"]
      for model in models:
          mod1 = getattr(df.xgboost, model)()
          mod2 = getattr(xgb, model)()
  
          df.fit(mod1)
          mod2.fit(X, y)
  
          result = df.predict(mod1)
          expected = mod2.predict(X)
  
          self.assertIsInstance(result, pdml.ModelSeries)
          self.assert_numpy_array_almost_equal(result.values, expected)
  
          self.assertIsInstance(df.predicted, pdml.ModelSeries)
          self.assert_numpy_array_almost_equal(
              df.predicted.values, expected
          )
  
file_path: pandas-ml/pandas_ml/xgboost/test/test_base.py
imports: import matplotlib
  import numpy
  import pandas
  import pandas_ml
  import pandas_ml.util.testing
  import sklearn.datasets
  import xgboost
label_desc: Use image node_id 3 for calling the TestXGBoost obj's underlying member method code with example usage: obj.test_XGBRegressor() without return types