code: def test_multioutput_array_metrics(self):
      y_true = [[1, 2], [2.5, -1], [4.5, 3], [5, 7]]
      y_pred = [[1, 1], [2, -1], [5, 4], [5, 6.5]]
  
      assert_array_almost_equal(
          MSE(y_true, y_pred, multioutput="raw_values"),
          [0.125, 0.5625],
          decimal=2,
      )
      assert_array_almost_equal(
          MAE(y_true, y_pred, multioutput="raw_values"),
          [0.25, 0.625],
          decimal=2,
      )
      assert_array_almost_equal(
          R2(y_true, y_pred, multioutput="raw_values"),
          [0.95, 0.93],
          decimal=2,
      )
  
      assert_array_almost_equal(
          sMAPE(y_true, y_pred, multioutput="raw_values"),
          [4.09, 12.83],
          decimal=2,
      )
      assert_array_almost_equal(
          MAPE(y_true, y_pred, multioutput="raw_values"),
          [7.78, 22.62],
          decimal=2,
      )
      assert_array_almost_equal(
          MPE(y_true, y_pred, multioutput="raw_values"),
          [2.22, 5.95],
          decimal=2,
      )
      assert_array_almost_equal(
          RMSE(y_true, y_pred, multioutput="raw_values"),
          [0.35, 0.75],
          decimal=2,
      )
  
      assert_array_almost_equal(
          ME(y_true, y_pred, multioutput="raw_values"),
          [0.0, 0.12],
          decimal=2,
      )
      assert_array_almost_equal(
          MSPE(y_true, y_pred, multioutput="raw_values"),
          [1.31, 9.16],
          decimal=2,
      )
      assert_array_almost_equal(
          MDAPE(y_true, y_pred, multioutput="raw_values"),
          [5.56, 20.24],
          decimal=2,
      )
      assert_array_almost_equal(
          sMDAPE(y_true, y_pred, multioutput="raw_values"),
          [2.63, 8.99],
          decimal=2,
      )
  
file_path: BigDL/python/orca/test/bigdl/orca/automl/test_metrics.py
imports: import pytest
  import numpy
  from bigdl.orca.test_zoo_utils import ZooTestCase
  from bigdl.orca.automl.metrics import ME, MAE, MSE, RMSE, MSLE, R2
  from bigdl.orca.automl.metrics import MPE, MAPE, MSPE, sMAPE, MDAPE, sMDAPE
  from numpy.testing import assert_almost_equal
  from numpy.testing import assert_array_almost_equal
label_desc: Use image node_id 7 for calling the TestMetrics obj's underlying member method code with example usage: obj.test_multioutput_array_metrics() without return types