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.
docstr: Partition ratings into n_folds
docstr_tok: ["Partition","ratings","into","n_folds"]
code: def _partition_data(self):
      """Partition ratings into n_folds"""
      fold_size = int(self.n_ratings / self.n_folds)
      remain_size = self.n_ratings - fold_size * self.n_folds
  
      partition = np.repeat(np.arange(self.n_folds), fold_size)
      self.rng.shuffle(partition)
  
      if remain_size > 0:
          remain_partition = self.rng.choice(
              self.n_folds, size=remain_size, replace=True, p=None
          )
          partition = np.concatenate((partition, remain_partition))
  
      return partition
  
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 2 for calling the CrossValidation obj's underlying member method code with example usage: obj._partition_data() and returns: partition