class_docstr: Test class for metrics tests.
class_docstr_tok: ["Test","class","for","metrics","tests","."]
code: def test_allow_off_by_one_qwk(self):
      outputs = [
          1.0,
          1.0,
          1.0,
          0.0,
          1.0,
          1.0,
          0.3333333333333333,
          1.0,
          1.0,
          1.0,
          0.5,
      ]
  
      for (y_true, y_pred), expected in zip(_KAPPA_INPUTS, outputs):
          yield self.check_kappa, y_true, y_pred, "quadratic", True, expected
  
      # Swap y_true and y_pred and test again
      for (y_pred, y_true), expected in zip(_KAPPA_INPUTS, outputs):
          yield self.check_kappa, y_true, y_pred, "quadratic", True, expected
  
file_path: skll/tests/test_metrics.py
imports: import unittest
  from pathlib import Path
  from numpy.testing import assert_almost_equal
  from sklearn.metrics import fbeta_score
  from skll.metrics import kappa, use_score_func
  from skll.utils.testing import output_dir, test_dir, train_dir
label_desc: Use image node_id 4 for calling the TestMetrics obj's underlying member method code with example usage: obj.test_allow_off_by_one_qwk() without return types