# Path: tensorflow_transform/gaussianization.py
# def tukey_hh_l_mean_and_scale(h_params):
# def _tukey_hh_l_skewness_and_kurtosis(h_params):
#   def skewness_num(h1, h2):
#   def skewness_den(h):
#   def kurtosis_den_part(h):
# def _binary_search(error_fn, low_value, high_value):
# def _params_to_errors(h, delta_h, l_skewness_and_kurtosis):
# def compute_tukey_hh_params(l_skewness_and_kurtosis):
# def lambert_w(x):
#   def newton_update(count, w):
# def inverse_tukey_hh(x, hl, hr):
#   def one_side(x, h):
# 
# Path: tensorflow_transform/test_case.py
# def is_tf_api_version_1():
# def cross_named_parameters(*args):
#   def _cross_test_cases(parameters_list):
# def parameters(*testcases):
#   def wrapper(fn):
#     def to_arg_dict(testcase):
# def cross_parameters(*args):
# def _make_placeholder(tensor_spec):
# def _graph_function_handler(input_signature):
#   def wrapper(fn):
#     def _run_graph(*inputs):
# def _ragged_value_as_constant(value, dtype):
# def _wrap_as_constant(value, tensor_spec):
# def _eager_function_handler(input_signature):
#   def wrapper(fn):
#     def _run_eagerly(*inputs):  # pylint: disable=missing-docstring
# def _tf_function_function_handler(input_signature):
#   def wrapper(fn):
# def is_external_environment():
# def skip_if_external_environment(reason):
# def skip_if_not_tf2(reason):
# def cross_with_function_handlers(parameters_list):
#   def assertDataCloseOrEqual(self, a_data, b_data):
#   def _assertValuesCloseOrEqual(self, a_value, b_value, msg=None):
#   def AssertVocabularyContents(self, vocab_file_path, file_contents):
#   def WriteRenderedDotFile(self, dot_string, output_file=None):
#   def _NumpyArraysToLists(self, maybe_arrays):
#   def _SortedDicts(self, list_of_dicts):
#   def _SortedData(self, list_of_dicts_of_arrays):
# FUNCTION_HANDLERS = [
#     dict(testcase_name='graph',
#          function_handler=_graph_function_handler),
#     dict(testcase_name='eager',
#          function_handler=_eager_function_handler),
#     dict(testcase_name='tf_function',
#          function_handler=_tf_function_function_handler)
# ]
# class TransformTestCase(parameterized.TestCase, tf.test.TestCase):


import numpy as np
from tensorflow_transform import gaussianization
from tensorflow_transform import test_case
    for output, expected_output in zip(outputs, expected_outputs):
      self.assertEqual(output.dtype, expected_output.dtype)
      self.assertAllEqual(output.shape, expected_output.shape)
      self.assertAllClose(output, expected_output)

  @test_case.named_parameters(
      _L_SKEWNESS_KURTOSIS_SCALAR_TEST,
      _L_SKEWNESS_KURTOSIS_ND_TEST
  )
  def test_tukey_hh_l_skewness_and_kurtosis(self, h_params, expected_outputs):
    outputs = gaussianization._tukey_hh_l_skewness_and_kurtosis(h_params)
    self.assertEqual(len(outputs), len(expected_outputs))
    for output, expected_output in zip(outputs, expected_outputs):
      self.assertEqual(output.dtype, expected_output.dtype)
      self.assertAllEqual(output.shape, expected_output.shape)
      self.assertAllClose(output, expected_output)

  @test_case.named_parameters(*(
      [_COMPUTE_TUKEY_H_PARAMS_NEG_SKEWNESS_TEST] +
      _COMPUTE_TUKEY_H_PARAMS_REGULAR_TESTS +
      _COMPUTE_TUKEY_H_PARAMS_PATOLOGICAL_TESTS))
  def test_compute_tukey_hh_params(
      self, l_skewness_and_kurtosis, expected_output):
    output = gaussianization.compute_tukey_hh_params(l_skewness_and_kurtosis)
    self.assertEqual(output.dtype, expected_output.dtype)
    self.assertAllEqual(output.shape, expected_output.shape)
    self.assertAllClose(output, expected_output)

  @test_case.named_parameters(*_LAMBERT_W_SCALAR_TESTS + _LAMBERT_W_ND_TESTS)
  def test_lambert_w(self, samples, expected_output):

# Path: tensorflow_transform/gaussianization.py
# def tukey_hh_l_mean_and_scale(h_params):
# def _tukey_hh_l_skewness_and_kurtosis(h_params):
#   def skewness_num(h1, h2):
#   def skewness_den(h):
#   def kurtosis_den_part(h):
# def _binary_search(error_fn, low_value, high_value):
# def _params_to_errors(h, delta_h, l_skewness_and_kurtosis):
# def compute_tukey_hh_params(l_skewness_and_kurtosis):
# def lambert_w(x):
#   def newton_update(count, w):
# def inverse_tukey_hh(x, hl, hr):
#   def one_side(x, h):
# 
# Path: tensorflow_transform/test_case.py
# def is_tf_api_version_1():
# def cross_named_parameters(*args):
#   def _cross_test_cases(parameters_list):
# def parameters(*testcases):
#   def wrapper(fn):
#     def to_arg_dict(testcase):
# def cross_parameters(*args):
# def _make_placeholder(tensor_spec):
# def _graph_function_handler(input_signature):
#   def wrapper(fn):
#     def _run_graph(*inputs):
# def _ragged_value_as_constant(value, dtype):
# def _wrap_as_constant(value, tensor_spec):
# def _eager_function_handler(input_signature):
#   def wrapper(fn):
#     def _run_eagerly(*inputs):  # pylint: disable=missing-docstring
# def _tf_function_function_handler(input_signature):
#   def wrapper(fn):
# def is_external_environment():
# def skip_if_external_environment(reason):
# def skip_if_not_tf2(reason):
# def cross_with_function_handlers(parameters_list):
#   def assertDataCloseOrEqual(self, a_data, b_data):
#   def _assertValuesCloseOrEqual(self, a_value, b_value, msg=None):
#   def AssertVocabularyContents(self, vocab_file_path, file_contents):
#   def WriteRenderedDotFile(self, dot_string, output_file=None):
#   def _NumpyArraysToLists(self, maybe_arrays):
#   def _SortedDicts(self, list_of_dicts):
#   def _SortedData(self, list_of_dicts_of_arrays):
# FUNCTION_HANDLERS = [
#     dict(testcase_name='graph',
#          function_handler=_graph_function_handler),
#     dict(testcase_name='eager',
#          function_handler=_eager_function_handler),
#     dict(testcase_name='tf_function',
#          function_handler=_tf_function_function_handler)
# ]
# class TransformTestCase(parameterized.TestCase, tf.test.TestCase):


# Path: tensorflow_transform/gaussianization_test.py
import numpy as np
from tensorflow_transform import gaussianization
from tensorflow_transform import test_case

    for output, expected_output in zip(outputs, expected_outputs):
      self.assertEqual(output.dtype, expected_output.dtype)
      self.assertAllEqual(output.shape, expected_output.shape)
      self.assertAllClose(output, expected_output)

  @test_case.named_parameters(
      _L_SKEWNESS_KURTOSIS_SCALAR_TEST,
      _L_SKEWNESS_KURTOSIS_ND_TEST
  )
  def test_tukey_hh_l_skewness_and_kurtosis(self, h_params, expected_outputs):
    outputs = gaussianization._tukey_hh_l_skewness_and_kurtosis(h_params)
    self.assertEqual(len(outputs), len(expected_outputs))
    for output, expected_output in zip(outputs, expected_outputs):
      self.assertEqual(output.dtype, expected_output.dtype)
      self.assertAllEqual(output.shape, expected_output.shape)
      self.assertAllClose(output, expected_output)

  @test_case.named_parameters(*(
      [_COMPUTE_TUKEY_H_PARAMS_NEG_SKEWNESS_TEST] +
      _COMPUTE_TUKEY_H_PARAMS_REGULAR_TESTS +
      _COMPUTE_TUKEY_H_PARAMS_PATOLOGICAL_TESTS))
  def test_compute_tukey_hh_params(
      self, l_skewness_and_kurtosis, expected_output):
    output = gaussianization.compute_tukey_hh_params(l_skewness_and_kurtosis)
    self.assertEqual(output.dtype, expected_output.dtype)
    self.assertAllEqual(output.shape, expected_output.shape)
    self.assertAllClose(output, expected_output)

  @test_case.named_parameters(*_LAMBERT_W_SCALAR_TESTS + _LAMBERT_W_ND_TESTS)
  def test_lambert_w(self, samples, expected_output):

    output = gaussianization.lambert_w(samples)