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 __init__(
      self,
      data,
      n_folds=5,
      rating_threshold=1.0,
      partition=None,
      seed=None,
      exclude_unknowns=True,
      verbose=False,
      **kwargs,
  ):
      BaseMethod.__init__(
          self,
          data=data,
          rating_threshold=rating_threshold,
          seed=seed,
          exclude_unknowns=exclude_unknowns,
          verbose=verbose,
          **kwargs,
      )
  
      self.n_folds = n_folds
      self.n_ratings = len(self.data)
      self.current_fold = 0
      self.current_split = None
  
      self._partition = self._validate_partition(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 1 to create a new CrossValidation object from inherited base classes: BaseMethod with example: obj = CrossValidation(data, n_folds, rating_threshold, partition, seed, exclude_unknowns, verbose)