code: def test_PLSRegression(self):
      n = 1000
      q = 3
      p = 10
      X = np.random.normal(size=n * p).reshape((n, p))
      B = np.array([[1, 2] + [0] * (p - 2)] * q).T
      # each Yj = 1*X1 + 2*X2 + noize
      Y = (
          np.dot(X, B)
          + np.random.normal(size=n * q).reshape((n, q))
          + 5
      )
  
      df = pdml.ModelFrame(X, target=Y)
      pls1 = df.cross_decomposition.PLSRegression(n_components=3)
      df.fit(pls1)
      result = df.predict(pls1)
  
      pls2 = cd.PLSRegression(n_components=3)
      pls2.fit(X, Y)
      expected = pls2.predict(X)
  
      self.assertIsInstance(result, pdml.ModelFrame)
      self.assert_numpy_array_almost_equal(result.values, expected)
  
file_path: pandas-ml/pandas_ml/skaccessors/test/test_cross_decomposition.py
imports: import pytest
  import numpy
  import pandas
  import sklearn.cross_decomposition
  import pandas_ml
  import pandas_ml.util.testing
label_desc: Use image node_id 4 for calling the TestCrossDecomposition obj's underlying member method code with example usage: obj.test_PLSRegression() without return types