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 evaluate(self, model, metrics, user_based, show_validation):
      result = CVResult(model.name)
  
      for _ in range(self.n_folds):
          self._get_train_test()
          new_model = model.clone()  # clone a completely new model
          fold_result, _ = BaseMethod.evaluate(
              self,
              new_model,
              metrics,
              user_based,
              show_validation=False,
          )
          result.append(fold_result)
          self._next_fold()
  
      result.organize()
  
      return result, None
  
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 6 for calling the CrossValidation obj's underlying member method code with example usage: obj.evaluate(model, metrics, user_based, show_validation) and returns: result,  None