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 validate_size(val_size, test_size, data_size):
      if val_size is None:
          val_size = 0.0
      elif val_size < 0:
          raise ValueError(
              "val_size={} should be greater than zero".format(val_size)
          )
      elif val_size >= data_size:
          raise ValueError(
              f"val_size={val_size} should be smaller than data_size={data_size}"
          )
  
      if test_size is None:
          test_size = 0.0
      elif test_size < 0:
          raise ValueError(
              f"test_size={test_size} should be greater than zero"
          )
      elif test_size >= data_size:
          raise ValueError(
              f"test_size={test_size} should be smaller than data_size={data_size}"
          )
  
      if val_size < 1:
          val_size = ceil(val_size * data_size)
      if test_size < 1:
          test_size = ceil(test_size * data_size)
  
      val_test_size = val_size + test_size
      if val_test_size >= data_size:
          raise ValueError(
              f"val_size + test_size ({val_test_size}) should be smaller than data_size={data_size}"
          )
  
      train_size = data_size - (val_size + test_size)
  
      return int(train_size), int(val_size), int(test_size)
  
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 2 for calling the RatioSplit obj's underlying member method code with example usage: obj.validate_size(val_size, test_size, data_size) and returns: int,  int,  int