code: def grid_check_model_on_dataset(
      train_interactions,
      test_interactions,
      user_features,
      item_features,
  ):
      results = []
      for n_components in [2, 4, 8, 16, 32, 64, 128, 256]:
          for epochs in [2, 4, 8, 16, 32, 64, 128, 256]:
              model = TensorRec(n_components=n_components)
              scores = fit_and_eval(
                  model,
                  user_features,
                  item_features,
                  train_interactions,
                  test_interactions,
                  fit_kwargs={"epochs": epochs},
              )
              results.append((n_components, scores))
              print(n_components, epochs, scores)
  
file_path: tensorrec/tensorrec/eval.py
imports: import numpy
  import scipy.sparse
  from .tensorrec import TensorRec
label_desc: Use image node_id 9 for calling a global function with example usage: grid_check_model_on_dataset(train_interactions, test_interactions, user_features, item_features) without return types