docstr: Compute the test-statistic (squared MMD) between the reference window and test window.
  
  Parameters
  ----------
  x_t
      A single instance to be added to the test-window.
  
  Returns
  -------
  Squared MMD estimate between reference window and test window.
docstr_tok: ["Compute","the","test-statistic","(","squared","MMD",")","between","the","reference","window","and","test","window",".","Parameters","--","--","--","--","--","x_t","A","single","instance","to","be","added","to","the","test-window",".","Returns","--","--","--","-","Squared","MMD","estimate","between","reference","window","and","test","window","."]
code: def score(self, x_t: Union[np.ndarray, Any]) -> float:
      """
      Compute the test-statistic (squared MMD) between the reference window and test window.
  
      Parameters
      ----------
      x_t
          A single instance to be added to the test-window.
  
      Returns
      -------
      Squared MMD estimate between reference window and test window.
      """
      x_t = super()._preprocess_xt(x_t)
      self._update_state(x_t)
      k_yy = self.kernel(self.test_window, self.test_window)
      mmd = (
          self.k_xx_sub_sum
          + tf.reduce_sum(zero_diag(k_yy))
          / (self.window_size * (self.window_size - 1))
          - 2 * tf.reduce_mean(self.k_xy)
      )
      return mmd.numpy()
  
file_path: alibi-detect/alibi_detect/cd/tensorflow/mmd_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.kernels import GaussianRBF
  from alibi_detect.utils.tensorflow import zero_diag, quantile, subset_matrix
  from alibi_detect.utils.frameworks import Framework
label_desc: Use image node_id 6 for calling the MMDDriftOnlineTF obj's underlying member method code with example usage: obj.score(x_t) and returns: mmd