class_docstr: Next Item Recommendation Evaluation method
  
  Parameters
  ----------
  data: list, required
      Raw preference data in the tuple format [(user_id, sessions)].
  
  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: 'SIT'
      Format of the input data. Currently, we are supporting:
  
      'SIT': Session, Item, Timestamp
      'USIT': User, Session, Item, Timestamp
      'SITJson': Session, Item, Timestamp, Json
      'USITJson': User, Session, Item, Timestamp, Json
  
  seed: int, optional, default: None
      Random seed for reproducibility.
  
  mode: str, optional, default: 'last'
      Evaluation mode is either 'next' or 'last'.
      If 'last', only evaluate the last item.
      If 'next', evaluate every next item in the sequence,
  
  exclude_unknowns: bool, optional, default: True
      If `True`, unknown items will be ignored during model evaluation.
  
  verbose: bool, optional, default: False
      Output running log.
class_docstr_tok: ["Next","Item","Recommendation","Evaluation","method","Parameters","--","--","--","--","--","data",":","list",",","required","Raw","preference","data","in","the","tuple","format","[","(","user_id",",","sessions",")","]",".","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",":","'SIT'","Format","of","the","input","data",".","Currently",",","we","are","supporting",":","'SIT","'",":","Session",",","Item",",","Timestamp","'USIT","'",":","User",",","Session",",","Item",",","Timestamp","'SITJson","'",":","Session",",","Item",",","Timestamp",",","Json","'USITJson","'",":","User",",","Session",",","Item",",","Timestamp",",","Json","seed",":","int",",","optional",",","default",":","None","Random","seed","for","reproducibility",".","mode",":","str",",","optional",",","default",":","'last'","Evaluation","mode","is","either","'next","'","or","'last","'",".","If","'last","'",",","only","evaluate","the","last","item",".","If","'next","'",",","evaluate","every","next","item","in","the","sequence",",","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 eval(
      model,
      train_set,
      test_set,
      exclude_unknowns,
      ranking_metrics,
      user_based=False,
      verbose=False,
      mode="last",
      **kwargs,
  ):
      metric_avg_results = OrderedDict()
      metric_user_results = OrderedDict()
  
      avg_results, user_results = ranking_eval(
          model=model,
          metrics=ranking_metrics,
          train_set=train_set,
          test_set=test_set,
          user_based=user_based,
          exclude_unknowns=exclude_unknowns,
          mode=mode,
          verbose=verbose,
      )
  
      for i, mt in enumerate(ranking_metrics):
          metric_avg_results[mt.name] = avg_results[i]
          metric_user_results[mt.name] = user_results[i]
  
      return Result(model.name, metric_avg_results, metric_user_results)
  
file_path: cornac/cornac/eval_methods/next_item_evaluation.py
imports: import time
  import warnings
  from collections import OrderedDict, defaultdict
  import numpy
  from tqdm.auto import tqdm
  from ..data import SequentialDataset
  from ..experiment.result import Result
  from ..models import NextItemRecommender
  from .None import BaseMethod
label_desc: Use image node_id 3 for calling the NextItemEvaluation obj's underlying member method code with example usage: obj.eval(model, train_set, test_set, exclude_unknowns, ranking_metrics, user_based, verbose, mode) and returns: Result