class_docstr: Class that is responsible for learning models and computing their metrics
class_docstr_tok: ["Class","that","is","responsible","for","learning","models","and","computing","their","metrics"]
docstr: Run all processes to gain stats. It applies algorithms to fold files that gains from learning. It keeps
  stats inside models and models are stored in DataFrame. Columns are matched to the different algos and rows to
  the folds.
  
  Args:
      :param splitter: Splitter entity.
      :param fold_size: The size of fold.
      :param folds_count: Count of golds.
      :param fold_offset: The offset (count of folds that we want to skip).
      :return: return dict: keys metric to CaseEvaluationResult
docstr_tok: ["Run","all","processes","to","gain","stats",".","It","applies","algorithms","to","fold","files","that","gains","from","learning",".","It","keeps","stats","inside","models","and","models","are","stored","in","DataFrame",".","Columns","are","matched","to","the","different","algos","and","rows","to","the","folds",".","Args",":",":","param","splitter",":","Splitter","entity",".",":","param","fold_size",":","The","size","of","fold",".",":","param","folds_count",":","Count","of","golds",".",":","param","fold_offset",":","The","offset","(","count","of","folds","that","we","want","to","skip",")",".",":","return",":","return","dict",":","keys","metric","to","CaseEvaluationResult"]
code: def proceed(self, splitter, fold_size, folds_count, fold_offset):
      """
      Run all processes to gain stats. It applies algorithms to fold files that gains from learning. It keeps
      stats inside models and models are stored in DataFrame. Columns are matched to the different algos and rows to
      the folds.
  
      Args:
          :param splitter: Splitter entity.
          :param fold_size: The size of fold.
          :param folds_count: Count of golds.
          :param fold_offset: The offset (count of folds that we want to skip).
          :return: return dict: keys metric to CaseEvaluationResult
  
      """
      try:
          folds_sets = splitter.create_fold_sets(fold_size, folds_count)
          fold_groups_files = splitter.fold_groups_files_generator(
              folds_sets, fold_offset
          )
          fold_id_bias = fold_offset
  
          for (
              learn_folds,
              skipped_folds,
              rest_folds,
          ) in fold_groups_files:
              if len(learn_folds) == 0:
                  continue
              list_models = []
              try:
                  permutation_models = self._fit_models(
                      learn_folds, fold_id_bias
                  )
                  for case, case_models in permutation_models.items():
                      list_models += case_models
  
                  learn_folds_count = len(learn_folds)
                  get_eval_logger().info(
                      "Start metric computation for folds [{}, {})".format(
                          fold_id_bias, fold_id_bias + learn_folds_count
                      )
                  )
                  self._compute_metrics(
                      self._metrics,
                      permutation_models,
                      learn_folds,
                      skipped_folds,
                      rest_folds,
                  )
                  get_eval_logger().info(
                      "Computation of metrics for  folds [{}, {}) is completed".format(
                          fold_id_bias, fold_id_bias + learn_folds_count
                      )
                  )
                  fold_id_bias += learn_folds_count
              finally:
                  # Do it each step because don't want to occupy a lot of memory
                  splitter.clean_folds()
                  self._remove_models(list_models)
  
      finally:
          # Also sometimes we need to remove models and always need to try to remove folds directory.
          self._clean(splitter)
  
      return self._case_results
  
imports: from __future__ import print_function
  import os
  import time
  from ..None import CatBoostError
  from ..eval.log_config import get_eval_logger
  from ..eval.utils import make_dirs_if_not_exists
  from ..eval.evaluation_result import CaseEvaluationResult
  from ._fold_model import FoldModel
label_desc: Use image node_id 7 for calling the FoldModelsHandler obj's underlying member method code with example usage: obj.proceed(splitter, fold_size, folds_count, fold_offset) and returns: self