docstr: Needed when ensemble is treated as model and we want to compute additional metrics for it
docstr_tok: ["Needed","when","ensemble","is","treated","as","model","and","we","want","to","compute","additional","metrics","for","it"]
code: def get_out_of_folds(self):
      """Needed when ensemble is treated as model and we want to compute additional metrics for it"""
      # single prediction (in case of binary classification and regression)
      if self.oof_predictions is not None:
          return self.oof_predictions.copy(deep=True)
  
      if self._oof_predictions_fname is not None:
          self.oof_predictions = pd.read_csv(
              self._oof_predictions_fname
          )
          return self.oof_predictions.copy(deep=True)
  
      ensemble_oof = pd.DataFrame(
          data=self.total_best_sum, columns=self.total_best_sum.columns
      )
      ensemble_oof["target"] = self.target
      if self.sample_weight is not None:
          ensemble_oof["sample_weight"] = self.sample_weight
  
      # if self.sensitive_features is not None:
      #    for col in self.sensitive_features.columns:
      #        ensemble_oof[col] = self.sensitive_features[col]
  
      self.oof_predictions = ensemble_oof
      return ensemble_oof
  
imports: import copy
  import json
  import logging
  import operator
  import os
  import time
  import uuid
  import numpy
  import pandas
  from supervised.algorithms.algorithm import BaseAlgorithm
  from supervised.algorithms.registry import BINARY_CLASSIFICATION, MULTICLASS_CLASSIFICATION, REGRESSION
  from supervised.exceptions import NotTrainedException
  from supervised.model_framework import ModelFramework
  from supervised.utils.additional_metrics import AdditionalMetrics
  from supervised.utils.config import LOG_LEVEL
  from supervised.utils.metric import Metric
  from supervised.utils.jsonencoder import MLJSONEncoder
  import matplotlib.pyplot
  from tabulate import tabulate
  from supervised.utils.learning_curves import LearningCurves
label_desc: Use image node_id 11 for calling the Ensemble obj's underlying member method code with example usage: obj.get_out_of_folds() and returns: ensemble_oof, self, self