Recommender Model

Distributed datasets containing information such as customer ratings or product purchases can be used to build a recommender model. This model can then be used to suggest items to customers with similar histories. Sensitive information such as individual purchase history can remain in place with the owner, but the insights of purchase trends can be extracted while still retaining privacy. This operation supports Federated Inference.


  • When using add_agreement() to forge an agreement on a trained Recommender Model, use Operation.EXECUTE for the operation parameter.
  • When using add_agreement() to allow a counterparty to use your dataset for model training, or when using create_job() to train a Recommender Model, use Operation.RECOMMENDER_TRAIN for the operation parameter.


Training parameters

  • user_id_column: str
  • item_id_column: str
  • rating_column: str
  • epochs: int = 5
  • learning_rate: float = 1e-3
  • hidden_dim: int = 100
  • reg_u: int = 1e-4
  • reg_v: int = 1e-4

ℹ️ Recommendation model will train models locally per data provider then adjust gradients at the initiating party.

Inference parameters

  • user_id_column: str = ""
  • top_n: int = 10