class_docstr: A classifier that operates through Sentence Transformer Finetuning (SetFit, [TRE+22]_).
  
  This class is a wrapper which encapsulates the
  `Hugging Face SetFit implementation <https://github.com/huggingface/setfit>_` .
  
  .. note ::
     This strategy requires the optional dependency `setfit`.
  
  .. versionadded:: 1.2.0
code: def _predict_proba_dropout_sampling(self, dataset, dropout_samples=2):
      # this whole method be done much more efficiently but this solution works without modifying setfit's code
  
      self.model.model_body.train()
      model_body_eval = self.model.model_body.eval
      self.model.model_body.eval = types.MethodType(
          lambda x: x, self.model.model_body
      )
  
      proba = np.empty(
          (0, dropout_samples, self.num_classes), dtype=float
      )
      proba[:, :, :] = np.inf
  
      with enable_dropout(self.model.model_body):
          num_batches = int(
              np.ceil(len(dataset) / self.mini_batch_size)
          )
          for batch in np.array_split(dataset.x, num_batches, axis=0):
              samples = np.empty(
                  (dropout_samples, len(batch), self.num_classes),
                  dtype=float,
              )
              for i in range(dropout_samples):
                  proba_tmp = np.zeros(
                      (batch.shape[0], self.num_classes), dtype=float
                  )
                  proba_tmp[
                      :, self.model.model_head.classes_
                  ] = self.model.predict_proba(batch)
                  samples[i] = proba_tmp
  
              samples = np.swapaxes(samples, 0, 1)
              proba = np.append(proba, samples, axis=0)
  
      self.model.model_body.eval = model_body_eval
  
      return proba
  
imports: import types
  import numpy
  from sklearn.exceptions import NotFittedError
  from sklearn.utils.validation import check_is_fitted
  from small_text.base import check_optional_dependency
  from small_text.classifiers.classification import Classifier, EmbeddingMixin
  from small_text.exceptions import UnsupportedOperationException
  from small_text.utils.classification import empty_result, _multi_label_list_to_multi_hot, prediction_result
  from small_text.utils.context import build_pbar_context
  from small_text.utils.labels import csr_to_list
  from small_text.integrations.transformers.classifiers.base import ModelLoadingStrategy
label_desc: Use image node_id 9 for calling the SetFitClassification obj's underlying member method code with example usage: obj._predict_proba_dropout_sampling(dataset, dropout_samples) and returns: proba