class_docstr: Class for decomposing target for both binary and multiclass
  classification task
class_docstr_tok: ["Class","for","decomposing","target","for","both","binary","and","multiclass","classification","task"]
docstr: Calculates difference between predictions (probabilities) and target
  :param target: class labels
  :param prev_prediction: predictions from previous classification model
  :return diff: difference between probabilities of classes
docstr_tok: ["Calculates","difference","between","predictions","(","probabilities",")","and","target",":","param","target",":","class","labels",":","param","prev_prediction",":","predictions","from","previous","classification","model",":","return","diff",":","difference","between","probabilities","of","classes"]
code: def _get_difference(
      self, target: np.array, prev_prediction: np.array
  ) -> np.array:
      """Calculates difference between predictions (probabilities) and target
      :param target: class labels
      :param prev_prediction: predictions from previous classification model
      :return diff: difference between probabilities of classes
      """
      classes = np.unique(target)
      if len(classes) > 2:
          diff = self._multi_difference(target, prev_prediction)
      else:
          diff = self._binary_difference(
              classes, target, prev_prediction
          )
      return diff
  
imports: from typing import Optional
  import numpy
  from sklearn.preprocessing import OneHotEncoder
  from fedot.core.data.data import InputData, OutputData
  from fedot.core.operations.evaluation.operation_implementations.implementation_interfaces import DataOperationImplementation
  from fedot.core.operations.operation_parameters import OperationParameters
  from fedot.core.repository.tasks import Task, TaskTypesEnum
label_desc: Use image node_id 5 for calling the DecomposerClassImplementation obj's underlying member method code with example usage: obj._get_difference(target, prev_prediction) and returns: diff