class_docstr: Apply SMOTE for classification tasks.
  
  This will average a percentage p of the elements in the batch with other elements.
  The target will stay unchanged and keep the value of the most important row in the mix.
class_docstr_tok: ["Apply","SMOTE","for","classification","tasks",".","This","will","average","a","percentage","p","of","the","elements","in","the","batch","with","other","elements",".","The","target","will","stay","unchanged","and","keep","the","value","of","the","most","important","row","in","the","mix","."]
code: def __call__(self, X, y):
      batch_size = X.shape[0]
      random_values = torch.rand(batch_size, device=self.device)
      idx_to_change = random_values < self.p
  
      # ensure that first element to switch has probability > 0.5
      np_betas = (
          np.random.beta(self.alpha, self.beta, batch_size) / 2 + 0.5
      )
      random_betas = torch.from_numpy(np_betas).to(self.device).float()
      index_permute = torch.randperm(batch_size, device=self.device)
  
      X[idx_to_change] = (
          random_betas[idx_to_change, None] * X[idx_to_change]
      )
      X[idx_to_change] += (1 - random_betas[idx_to_change, None]) * X[
          index_permute
      ][idx_to_change].view(
          X[idx_to_change].size()
      )  # noqa
  
      return X, y
  
file_path: tabnet/pytorch_tabnet/augmentations.py
imports: import torch
  from pytorch_tabnet.utils import define_device
  import numpy
label_desc: Use image node_id 3 for calling the ClassificationSMOTE obj's underlying member method code with example usage: obj.__call__(X, y) and returns: X,  y