class_docstr: Next Basket Recommendation Evaluation method
  
  Parameters
  ----------
  data: list, required
      Raw preference data in the tuple format [(user_id, baskets)].
  
  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.
  
  fmt: str, default: 'UBI'
      Format of the input data. Currently, we are supporting:
  
      'UBI': User, Basket, Item
      'UBIT': User, Basket, Item, Timestamp
      'UBITJson': User, Basket, Item, Timestamp, Json
  
  seed: int, optional, default: None
      Random seed for reproducibility.
  
  exclude_unknowns: bool, optional, default: True
      If `True`, unknown items will be ignored during model evaluation.
  
  verbose: bool, optional, default: False
      Output running log.
code: def __init__(
      self,
      data=None,
      test_size=0.2,
      val_size=0.0,
      fmt="UBI",
      seed=None,
      repetition_eval=False,
      exploration_eval=False,
      exclude_unknowns=True,
      verbose=False,
      **kwargs,
  ):
      assert fmt.startswith("U")
      data_size = len(set(u for (u, *_) in data))  # number of users
  
      super().__init__(
          data=data,
          data_size=data_size,
          test_size=test_size,
          val_size=val_size,
          fmt=fmt,
          seed=seed,
          exclude_unknowns=exclude_unknowns,
          verbose=verbose,
          **kwargs,
      )
      self.repetition_eval = repetition_eval
      self.exploration_eval = exploration_eval
  
file_path: cornac/cornac/eval_methods/next_basket_evaluation.py
imports: from collections import OrderedDict
  import numpy
  from tqdm.auto import tqdm
  from .None import RatioSplit
  from ..data import BasketDataset
  from ..experiment.result import Result
  from ..utils.common import safe_indexing
label_desc: Use image node_id 1 to create a new NextBasketEvaluation object from inherited base classes: RatioSplit with example: obj = NextBasketEvaluation(data, test_size, val_size, fmt, seed, repetition_eval, exploration_eval, exclude_unknowns, verbose)