class_docstr: Integration with the lightfm Recommender library.
code: def evaluate(
      self, interaction_matrix, random_state, model_parameters
  ):
      train, test = random_train_test_split(
          interaction_matrix,
          test_percentage=0.2,
          random_state=random_state,
      )
      model = LightFM(
          learning_rate=model_parameters.learning_rate,
          loss=model_parameters.loss,
          random_state=random_state,
      )
  
      model.fit(train, epochs=model_parameters.epochs)
  
      evaluation_metrics = dict(
          auc=auc_score(model, test, train).mean(),
          precision=precision_at_k(model, test, train).mean(),
          recall=recall_at_k(model, test, train).mean(),
      )
  
      return evaluation_metrics
  
file_path: mindsdb/mindsdb/integrations/handlers/lightfm_handler/lightfm_handler.py
imports: from typing import Dict, Optional
  import dill
  import pandas
  from dataprep_ml.recommenders import RecommenderPreprocessor
  from lightfm import LightFM
  from lightfm.cross_validation import random_train_test_split
  from lightfm.evaluation import auc_score, precision_at_k, recall_at_k
  from mindsdb.integrations.handlers.lightfm_handler.helpers import get_item_item_recommendations, get_user_item_recommendations
  from mindsdb.integrations.handlers.lightfm_handler.settings import ModelParameters
  from mindsdb.integrations.libs.base import BaseMLEngine
label_desc: Use image node_id 4 for calling the LightFMHandler obj's underlying member method code with example usage: obj.evaluate(interaction_matrix, random_state, model_parameters) and returns: evaluation_metrics