class_docstr: Tests tabular hot-flips with regression models.
class_docstr_tok: ["Tests","tabular","hot-flips","with","regression","models","."]
docstr: Tests the case when the target prediction is below the threshold.
  
  If the target (reference) prediction is below the decision boundary
  threshold, the predictions for all counterfactuals should be above or equal
  the threshold.
code: def test_output_is_above_threshold_counterfactuals(self):
      """Tests the case when the target prediction is below the threshold.
  
      If the target (reference) prediction is below the decision boundary
      threshold, the predictions for all counterfactuals should be above or equal
      the threshold.
      """
      threshold = 0.1
      self._config["Regression threshold"] = str(threshold)
      self._example = {"x_1": 0.0, "x_2": -5.0}
      output = self._gen.generate(
          example=self._example,
          model=self._model,
          dataset=self._dataset,
          config=self._config,
      )
      target_score = self._predict_and_return_score(self._example)
      self.assertLess(target_score, threshold)
      self.assertNotEmpty(output)
      for cf_example in output:
          cf_score = self._predict_and_return_score(cf_example)
          self.assertGreaterEqual(cf_score, threshold)
  
imports: from unittest import mock
  from absl.testing import absltest
  from lit_nlp.api import dataset
  from lit_nlp.api import model
  from lit_nlp.api import types
  from lit_nlp.components import minimal_targeted_counterfactuals
  from lit_nlp.lib import caching
  import numpy
  import scipy.special
label_desc: Use image node_id 4 for calling the RegressionTabularMtcTest obj's underlying member method code with example usage: obj.test_output_is_above_threshold_counterfactuals() without return types