class_docstr: Callable objective function to be used with optuna.
class_docstr_tok: ["Callable","objective","function","to","be","used","with","optuna","."]
code: def get_results(self, split: str = "validation"):
      _get_results_helper: callable
      if split in ("val", "validation"):
          _get_results_helper = lambda r: r.validation_results
      elif split in ("test", "testing"):
          _get_results_helper = lambda r: r.test_results
      elif split in ("train", "training"):
          _get_results_helper = lambda r: r.train_results
      else:
          raise ValueError(f"Value of type_='{split}' is invalid.")
  
      return pd.DataFrame(
          data=[
              {
                  "algorithm": r.algorithm,
                  **_get_results_helper(r),
              }
              for r in self._models_results
          ],
          index=[r.id for r in self._models_results],
      )
  
imports: import dataclasses
  import logging
  import pickle
  import time
  from pathlib import Path
  from typing import Optional, Union
  import numpy
  import pandas
  from hpt.suggest import suggest_callable_hyperparams
  from omegaconf import DictConfig, OmegaConf
  from optuna.trial import BaseTrial
  from ..evaluation import evaluate_fairness, evaluate_performance
  from ..methods import InProcessing, PostProcessing, PreProcessing
  from ..methods.postprocessing.threshold import Threshold
label_desc: Use image node_id 2 for calling the ObjectiveFunction obj's underlying member method code with example usage: obj.get_results(split) and returns: pd