code: def fit(self, comparison_vectors, match_index=None):
          
          logging.info("Classification - start training {}".format(
              self.__class__.__name__)
          )
  
          self._initialise_classifier(comparison_vectors)
  
          # start timing
          start_time = time.time()
  
          if isinstance(match_index, (pandas.MultiIndex, pandas.Index)):
  
              try:
                  y = pandas.Series(0, index=comparison_vectors.index)
                  y.loc[match_index & comparison_vectors.index] = 1
              except pandas.IndexError as err:
  
                  # The are no matches. So training is not possible.
                  if len(match_index & comparison_vectors.index) == 0:
                      raise LearningError(
                          "both matches and non-matches needed in the" +
                          "trainingsdata, only non-matches found"
                      )
                  else:
                      raise err
  
              self._fit(comparison_vectors.values, y.values)
  
          elif match_index is None:
              self._fit(comparison_vectors.values)
          else:
              raise ValueError(
                  "'match_index' has incorrect type '{}'".format(
                      type(match_index)
                  )
              )
  
          # log timing
          logf_time = "Classification - training computation time: ~{:.2f}s"
          logging.info(logf_time.format(time.time() - start_time))
docs: Train the classifier.
  
          Parameters
          ----------
          comparison_vectors : pandas.DataFrame
              The comparison vectors (or features) to train the model with.
          match_index : pandas.MultiIndex
              A pandas.MultiIndex object with the true matches.
              The MultiIndex contains only the true matches. Default None.
  
          Note
          ----
  
          A note in case of finding links within a single dataset (for example
          deduplication). Unsure that the training record pairs are from the
          lower triangular part of the dataset/matrix. See detailed information
          here: link.