code: def test_logistic():
      interactions = movielens.get_movielens_dataset("100K")
  
      # Convert to binary
      interactions.ratings = (interactions.ratings > 3).astype(
          np.float32
      )
      # Convert from (0, 1) to (-1, 1)
      interactions.ratings = interactions.ratings * 2 - 1
  
      train, test = random_train_test_split(
          interactions, random_state=RANDOM_STATE
      )
  
      model = ExplicitFactorizationModel(
          loss="logistic",
          n_iter=10,
          batch_size=1024,
          learning_rate=1e-3,
          l2=1e-6,
          use_cuda=CUDA,
      )
      model.fit(train)
  
      rmse = rmse_score(model, test)
  
      assert rmse - EPSILON < 1.05
  
file_path: spotlight/tests/factorization/test_explicit.py
imports: import os
  import numpy
  import pytest
  from spotlight.cross_validation import random_train_test_split
  from spotlight.datasets import movielens
  from spotlight.evaluation import rmse_score
  from spotlight.factorization.explicit import ExplicitFactorizationModel
  from spotlight.factorization.representations import BilinearNet
  from spotlight.layers import BloomEmbedding
label_desc: Use image node_id 3 for calling a global function with example usage: test_logistic() without return types