code: def test_evaluate_movielens_100k():
      _, ratings = get_movielens(variant="100k")
  
      # remove things < min_rating, and convert to implicit dataset
      # by considering ratings as a binary preference only
      min_rating = 3.0
      ratings.data[ratings.data < min_rating] = 0
      ratings.eliminate_zeros()
      ratings.data = np.ones(len(ratings.data))
  
      user_ratings = ratings.T.tocsr()
      train, test = train_test_split(user_ratings)
  
      model = implicit.als.AlternatingLeastSquares()
      model.fit(train)
  
      assert precision_at_k(model, train, test) > 0.2
  
file_path: implicit/tests/evaluation_test.py
imports: import numpy
  import pytest
  from scipy.sparse import csr_matrix, random
  import implicit
  from implicit.evaluation import leave_k_out_split, precision_at_k, train_test_split
  from implicit.datasets.movielens import get_movielens
label_desc: Use image node_id 11 for calling a global function with example usage: test_evaluate_movielens_100k() without return types