docstr: Tests that the output of ShiftScaleTail is correct when delta!=0.
docstr_tok: ["Tests","that","the","output","of","ShiftScaleTail","is","correct","when","delta","!","=0","."]
code: def testLambertWGaussianizationDeltaNonZeroSpecificValues(
      self, delta
  ):
      """Tests that the output of ShiftScaleTail is correct when delta!=0."""
      vals = np.linspace(-1, 1, 10) + self.loc
      lsht = lambertw_transform.LambertWTail(
          shift=self.loc, scale=self.scale, tailweight=delta
      )
      scaled_vals = (vals - self.loc) / self.scale
      ht_vals = _xexp_delta_squared_numpy(scaled_vals, delta=delta)
      ht_vals *= self.scale
      ht_vals += self.loc
      self.assertAllClose(
          ht_vals, self.evaluate(lsht.forward(vals)), rtol=0.0001
      )
      # Inverse-Gaussianizing pushes the values be further away from the mean,
      # i.e., their centered ratio > 1 (for vals - loc != 0).
      self.assertTrue(
          np.all(
              (self.evaluate(lsht.forward(vals)) - self.loc)
              / (vals - self.loc)
              > 1.0
          )
      )
      # Inverse function is correct.
      self.assertAllClose(lsht.inverse(lsht.forward(vals)), vals)
  
imports: from absl.testing import parameterized
  import numpy
  from scipy import special
  from scipy import stats
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import lambertw_transform
  from tensorflow_probability.python.internal import test_util
label_desc: Use image node_id 3 for calling the LambertWGaussianizationTest obj's underlying member method code with example usage: obj.testLambertWGaussianizationDeltaNonZeroSpecificValues(delta) without return types