docstr: Tests the randomization of the Halton sequences.
docstr_tok: ["Tests","the","randomization","of","the","Halton","sequences","."]
code: def test_randomized_qmc_basic(self):
      """Tests the randomization of the Halton sequences."""
      # This test is identical to the example given in Owen (2017), Figure 5.
  
      dim = 20
      num_results = 2000
      replicas = 50
  
      samples = sample_halton_sequence_lib.sample_halton_sequence(
          dim,
          num_results=replicas * num_results,
          seed=test_util.test_seed_stream(),
      )
      samples = tf.reshape(samples, [replicas, num_results, dim])
      values = self.evaluate(
          tf.reduce_mean(tf.reduce_sum(samples, axis=-1) ** 2, axis=-1)
      )
      self.assertAllClose(
          values.mean(), 101.6667, atol=values.std() / np.sqrt(replicas)
      )
  
file_path: probability/tensorflow_probability/python/mcmc/sample_halton_sequence_test.py
imports: import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import normal
  from tensorflow_probability.python.internal import monte_carlo
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.mcmc import sample_halton_sequence_lib
label_desc: Use image node_id 8 for calling the HaltonSequenceTest obj's underlying member method code with example usage: obj.test_randomized_qmc_basic() without return types