class_docstr: To run: "python -m unittest saliency.tf1.guided_ig_test" from the top-level directory.
class_docstr_tok: ["To","run",":","``","python","-m","unittest","saliency.tf1.guided_ig_test","''","from","the","top-level","directory","."]
docstr: Tests bounded Guided IG with quadratic function and dependent partials.
  
  The expected result should be between attributions of Integrated Gradients
  and unbounded IG. The test checks that the result attribution satisfies the
  completeness axiom.
docstr_tok: ["Tests","bounded","Guided","IG","with","quadratic","function","and","dependent","partials",".","The","expected","result","should","be","between","attributions","of","Integrated","Gradients","and","unbounded","IG",".","The","test","checks","that","the","result","attribution","satisfies","the","completeness","axiom","."]
code: def testDependentQuadratic(self):
      """Tests bounded Guided IG with quadratic function and dependent partials.
  
      The expected result should be between attributions of Integrated Gradients
      and unbounded IG. The test checks that the result attribution satisfies the
      completeness axiom.
      """
      gig = self._create_gig(self._quadratic_dep_test_model)
      mask = gig.GetMask(
          x_value=[3, 3], x_steps=1000, fraction=0.1, max_dist=0.2
      )
      # Check the result satisfy completeness.
      self.assertAlmostEqual(mask.sum(), 81.0, delta=0.1)
      # Check that the result is between unbounded Guided IG and IG.
      self.assertTrue(55.0 < mask[0] < 71.0)
      self.assertTrue(10.0 < mask[1] < 26.0)
  
file_path: saliency/saliency/tf1/guided_ig_test.py
imports: import unittest
  from .None import guided_ig
  import numpy
  import tensorflow.compat.v1
label_desc: Use image node_id 13 for calling the GuidedIGTest obj's underlying member method code with example usage: obj.testDependentQuadratic() without return types