docstr: Parameters
  ----------
  dataset : small_text.data.datasets.Dataset
      A dataset whose labels will be predicted.
  dropout_sampling : int, default=1
      If `dropout_sampling > 1` then all dropout modules will be enabled during prediction and
      multiple rounds of predictions will be sampled for each instance.
  
  Returns
  -------
  scores : np.ndarray
      Distribution of confidence scores over all classes of shape (num_samples, num_classes).
      If `dropout_sampling > 1` then the shape is (num_samples, dropout_sampling, num_classes).
docstr_tok: ["Parameters","--","--","--","--","--","dataset",":","small_text.data.datasets.Dataset","A","dataset","whose","labels","will","be","predicted",".","dropout_sampling",":","int",",","default=1","If","`","dropout_sampling",">","1","`","then","all","dropout","modules","will","be","enabled","during","prediction","and","multiple","rounds","of","predictions","will","be","sampled","for","each","instance",".","Returns","--","--","--","-","scores",":","np.ndarray","Distribution","of","confidence","scores","over","all","classes","of","shape","(","num_samples",",","num_classes",")",".","If","`","dropout_sampling",">","1","`","then","the","shape","is","(","num_samples",",","dropout_sampling",",","num_classes",")","."]
code: def predict_proba(self, dataset, dropout_sampling=1):
      """
      Parameters
      ----------
      dataset : small_text.data.datasets.Dataset
          A dataset whose labels will be predicted.
      dropout_sampling : int, default=1
          If `dropout_sampling > 1` then all dropout modules will be enabled during prediction and
          multiple rounds of predictions will be sampled for each instance.
  
      Returns
      -------
      scores : np.ndarray
          Distribution of confidence scores over all classes of shape (num_samples, num_classes).
          If `dropout_sampling > 1` then the shape is (num_samples, dropout_sampling, num_classes).
      """
      if len(dataset) == 0:
          return empty_result(
              self.multi_label,
              self.num_classes,
              return_prediction=False,
              return_proba=True,
          )
  
      self.model.eval()
      dataset_iter = dataloader(
          dataset.data,
          self.mini_batch_size,
          self._create_collate_fn(),
          train=False,
      )
  
      logits_transform = (
          torch.sigmoid
          if self.multi_label
          else partial(F.softmax, dim=1)
      )
  
      with torch.no_grad():
          if dropout_sampling <= 1:
              return self._predict_proba(dataset_iter, logits_transform)
          else:
              return self._predict_proba_dropout_sampling(
                  dataset_iter,
                  logits_transform,
                  dropout_samples=dropout_sampling,
              )
  
imports: import logging
  import warnings
  from abc import abstractmethod
  from functools import partial
  from pathlib import Path
  from small_text.classifiers.classification import Classifier
  from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
  from small_text.training.early_stopping import EarlyStopping, NoopEarlyStopping, EarlyStoppingOrCondition
  from small_text.training.metrics import Metric
  from small_text.training.model_selection import ModelSelection, NoopModelSelection
  from small_text.utils.classification import empty_result, prediction_result
label_desc: Use image node_id 4 for calling the PytorchClassifier obj's underlying member method code with example usage: obj.predict_proba(dataset, dropout_sampling) and returns: empty_result, self, self