class_docstr: Cross Validation Evaluation Method.
  
  Parameters
  ----------
  data: array-like, required
      Raw preference data in the triplet format [(user_id, item_id, rating_value)].
  
  n_folds: int, optional, default: 5
      The number of folds for cross validation.
  
  rating_threshold: float, optional, default: 1.0
      Threshold used to binarize rating values into positive or negative feedback for
      model evaluation using ranking metrics (rating metrics are not affected).
  
  partition: array-like, shape (n_observed_ratings,), optional, default: None
      The partition of ratings into n_folds (fold label of each rating)         If `None`, random partitioning is performed to assign each rating into a fold.
  
  seed: int, optional, default: None
      Random seed for reproducibility.
  
  exclude_unknowns: bool, optional, default: True
      If `True`, unknown users and items will be ignored during model evaluation.
  
  verbose: bool, optional, default: False
      Output running log.
code: def _get_train_test(self):
      if self.verbose:
          print("Fold: {}".format(self.current_fold + 1))
  
      test_idx = np.where(self._partition == self.current_fold)[0]
      train_idx = np.where(self._partition != self.current_fold)[0]
  
      train_data = safe_indexing(self.data, train_idx)
      test_data = safe_indexing(self.data, test_idx)
      self.build(
          train_data=train_data, test_data=test_data, val_data=test_data
      )
  
file_path: cornac/cornac/eval_methods/cross_validation.py
imports: import numpy
  from ..utils.common import safe_indexing
  from ..experiment.result import CVResult
  from ..utils import get_rng
  from ..data import Dataset
  from .base_method import BaseMethod
label_desc: Use image node_id 4 for calling the CrossValidation obj's underlying member method code with example usage: obj._get_train_test() without return types