class_docstr: Splitting data into training, validation, and test sets based on provided sizes.
  Data is always shuffled before split.
  
  Parameters
  ----------
  data: array-like, required
      Raw preference data in the triplet format [(user_id, item_id, rating_value)].
  
  test_size: float, optional, default: 0.2
      The proportion of the test set,         if > 1 then it is treated as the size of the test set.
  
  val_size: float, optional, default: 0.0
      The proportion of the validation set,         if > 1 then it is treated as the size of the validation set.
  
  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).
  
  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,
      test_size=0.2,
      val_size=0.0,
      rating_threshold=1.0,
      seed=None,
      exclude_unknowns=True,
      verbose=False,
      **kwargs,
  ):
      super().__init__(
          data=data,
          rating_threshold=rating_threshold,
          seed=seed,
          exclude_unknowns=exclude_unknowns,
          verbose=verbose,
          **kwargs,
      )
  
      (
          self.train_size,
          self.val_size,
          self.test_size,
      ) = self.validate_size(
          val_size=val_size,
          test_size=test_size,
          data_size=kwargs.get("data_size", len(data)),
      )
      self._split()
  
file_path: cornac/cornac/eval_methods/ratio_split.py
imports: from math import ceil
  from .base_method import BaseMethod
  from ..utils.common import safe_indexing
label_desc: Use image node_id 1 to create a new RatioSplit object from inherited base classes: BaseMethod with example: obj = RatioSplit(data, test_size, val_size, rating_threshold, seed, exclude_unknowns, verbose)