docstr: Set aside reference samples to act as kernel centers
docstr_tok: ["Set","aside","reference","samples","to","act","as","kernel","centers"]
code: def _configure_kernel_centers(self):
      "Set aside reference samples to act as kernel centers"
      perm = torch.randperm(self.n)
      self.c_inds, self.non_c_inds = (
          perm[: self.n_kernel_centers],
          perm[self.n_kernel_centers :],
      )
      self.kernel_centers = torch.from_numpy(
          self.x_ref[self.c_inds]
      ).to(self.device)
      if (
          np.unique(self.kernel_centers.cpu().numpy(), axis=0).shape[0]
          < self.n_kernel_centers
      ):
          perturbation = (
              torch.randn(self.kernel_centers.shape) * 1e-6
          ).to(self.device)
          self.kernel_centers = self.kernel_centers + perturbation
      self.x_ref_eff = torch.from_numpy(self.x_ref[self.non_c_inds]).to(
          self.device
      )  # the effective reference set
      self.k_xc = self.kernel(self.x_ref_eff, self.kernel_centers)
  
file_path: alibi-detect/alibi_detect/cd/pytorch/lsdd_online.py
imports: from tqdm import tqdm
  import numpy
  import torch
  from typing import Any, Callable, Optional, Union
  from alibi_detect.cd.base_online import BaseMultiDriftOnline
  from alibi_detect.utils.pytorch import get_device
  from alibi_detect.utils.pytorch import GaussianRBF, permed_lsdds, quantile
  from alibi_detect.utils.frameworks import Framework
  from alibi_detect.utils._types import TorchDeviceType
label_desc: Use image node_id 3 for calling the LSDDDriftOnlineTorch obj's underlying member method code with example usage: obj._configure_kernel_centers() without return types