class_docstr: Base class for a DS method based on the potential function model.
  All DS methods based on the Potential function should inherit from this
  class.
  
  Warning: This class should not be used directly.
  Use derived classes instead.
docstr: Train the DS model by setting the KNN algorithm and
  pre-processing the information required to apply the DS
  methods. In the case of probabilistic techniques, the source of
  competence (C_src) is calculated for each data point in DSEL in order
  to speed up the process during the testing phases.
  
  C_src is estimated with the source_competence() function that is
  overridden by each DS method based on this paradigm.
  
  Parameters
  ----------
  X : array of shape (n_samples, n_features)
      Data used to fit the model.
  
  y : array of shape (n_samples)
      class labels of each example in X.
  
  Returns
  -------
  self : object
      Returns self.
code: def fit(self, X, y):
      """Train the DS model by setting the KNN algorithm and
      pre-processing the information required to apply the DS
      methods. In the case of probabilistic techniques, the source of
      competence (C_src) is calculated for each data point in DSEL in order
      to speed up the process during the testing phases.
  
      C_src is estimated with the source_competence() function that is
      overridden by each DS method based on this paradigm.
  
      Parameters
      ----------
      X : array of shape (n_samples, n_features)
          Data used to fit the model.
  
      y : array of shape (n_samples)
          class labels of each example in X.
  
      Returns
      -------
      self : object
          Returns self.
      """
      super(BaseProbabilistic, self).fit(X, y)
  
      if self.n_classes_ == 1:
          raise ValueError(
              "Error. This class does not accept one class datasets!"
          )
  
      self._check_predict_proba()
  
      self.dsel_scores_ = self._predict_proba_base(self.DSEL_data_)
  
      # Pre process the source of competence for the entire DSEL,
      # making the method faster during generalization.
      self.C_src_ = self.source_competence()
      return self
  
file_path: DESlib/deslib/des/probabilistic/base.py
imports: from abc import abstractmethod, ABCMeta
  import numpy
  from deslib.des.base import BaseDES
label_desc: Use image node_id 2 for calling the BaseProbabilistic obj's underlying member method code with example usage: obj.fit(X, y) and returns: self