docstr: Configure the reference data split. If the randomly selected split causes an initial detection, further splits
  are attempted.
docstr_tok: ["Configure","the","reference","data","split",".","If","the","randomly","selected","split","causes","an","initial","detection",",","further","splits","are","attempted","."]
code: def _configure_ref_subset(self):
      """
      Configure the reference data split. If the randomly selected split causes an initial detection, further splits
      are attempted.
      """
      etw_size = 2 * self.window_size - 1  # etw = extended test window
      nkc_size = (
          self.n - self.n_kernel_centers
      )  # nkc = non-kernel-centers
      rw_size = nkc_size - etw_size  # rw = ref-window
      # Make split and ensure it doesn't cause an initial detection
      lsdd_init = None
      while lsdd_init is None or lsdd_init >= self.get_threshold(0):
          # Make split
          perm = tf.random.shuffle(tf.range(nkc_size))
          self.ref_inds, self.init_test_inds = (
              perm[:rw_size],
              perm[-self.window_size :],
          )
          self.c2s = tf.reduce_mean(
              tf.gather(self.k_xc, self.ref_inds), axis=0
          )  # (below Eqn 21)
          # Compute initial lsdd to check for initial detection
          self._initialise_state()  # to set self.test_window and self.k_xtc
          h_init = self.c2s - tf.reduce_mean(
              self.k_xtc, axis=0
          )  # (Eqn 21)
          lsdd_init = h_init[None, :] @ self.H_lam_inv @ h_init[:, None]
  
file_path: alibi-detect/alibi_detect/cd/tensorflow/lsdd_online.py
imports: from tqdm import tqdm
  import numpy
  import tensorflow
  from typing import Any, Callable, Optional, Union
  from alibi_detect.cd.base_online import BaseMultiDriftOnline
  from alibi_detect.utils.tensorflow import GaussianRBF, quantile, permed_lsdds
  from alibi_detect.utils.frameworks import Framework
label_desc: Use image node_id 6 for calling the LSDDDriftOnlineTF obj's underlying member method code with example usage: obj._configure_ref_subset() without return types