docstr: Make predictions for classification on a batch (valid)
  
  Parameters
  ----------
  X : a :tensor: `torch.Tensor` or matrix: `scipy.sparse.csr_matrix`
      Input data
  
  Returns
  -------
  res : np.ndarray
docstr_tok: ["Make","predictions","for","classification","on","a","batch","(","valid",")","Parameters","--","--","--","--","--","X",":","a",":","tensor",":","`","torch.Tensor","`","or","matrix",":","`","scipy.sparse.csr_matrix","`","Input","data","Returns","--","--","--","-","res",":","np.ndarray"]
code: def predict_proba(self, X):
      """
      Make predictions for classification on a batch (valid)
  
      Parameters
      ----------
      X : a :tensor: `torch.Tensor` or matrix: `scipy.sparse.csr_matrix`
          Input data
  
      Returns
      -------
      res : np.ndarray
  
      """
      self.network.eval()
  
      if scipy.sparse.issparse(X):
          dataloader = DataLoader(
              SparsePredictDataset(X),
              batch_size=self.batch_size,
              shuffle=False,
          )
      else:
          dataloader = DataLoader(
              PredictDataset(X),
              batch_size=self.batch_size,
              shuffle=False,
          )
  
      results = []
      for batch_nb, data in enumerate(dataloader):
          data = data.to(self.device).float()
  
          output, M_loss = self.network(data)
          predictions = (
              torch.nn.Softmax(dim=1)(output).cpu().detach().numpy()
          )
          results.append(predictions)
      res = np.vstack(results)
      return res
  
imports: import torch
  import numpy
  from scipy.special import softmax
  from pytorch_tabnet.utils import SparsePredictDataset, PredictDataset, filter_weights
  from pytorch_tabnet.abstract_model import TabModel
  from pytorch_tabnet.multiclass_utils import infer_output_dim, check_output_dim
  from torch.utils.data import DataLoader
  import scipy
label_desc: Use image node_id 8 for calling the TabNetClassifier obj's underlying member method code with example usage: obj.predict_proba(X) and returns: res