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 _split(self):
      data_idx = self.rng.permutation(len(self.data))
      train_idx = data_idx[: self.train_size]
      test_idx = data_idx[-self.test_size :]
      val_idx = data_idx[self.train_size : -self.test_size]
  
      train_data = safe_indexing(self.data, train_idx)
      test_data = safe_indexing(self.data, test_idx)
      val_data = (
          safe_indexing(self.data, val_idx)
          if len(val_idx) > 0
          else None
      )
  
      self.build(
          train_data=train_data, test_data=test_data, val_data=val_data
      )
  
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 3 for calling the RatioSplit obj's underlying member method code with example usage: obj._split() without return types