elliot.recommender.neural.GeneralizedMF package

Submodules

elliot.recommender.neural.GeneralizedMF.generalized_matrix_factorization module

Module description:

class elliot.recommender.neural.GeneralizedMF.generalized_matrix_factorization.GMF(data, config, params, *args, **kwargs)[source]

Bases: elliot.recommender.recommender_utils_mixin.RecMixin, elliot.recommender.base_recommender_model.BaseRecommenderModel

Neural Collaborative Filtering

For further details, please refer to the paper

Parameters
  • mf_factors – Number of latent factors

  • lr – Learning rate

  • is_edge_weight_train – Whether the training uses edge weighting

To include the recommendation model, add it to the config file adopting the following pattern:

models:
  GMF:
    meta:
      save_recs: True
    epochs: 10
    batch_size: 512
    mf_factors: 10
    lr: 0.001
    is_edge_weight_train: True
get_recommendations(k: int = 100)[source]
property name
train()[source]

elliot.recommender.neural.GeneralizedMF.generalized_matrix_factorization_model module

Module description:

class elliot.recommender.neural.GeneralizedMF.generalized_matrix_factorization_model.GeneralizedMatrixFactorizationModel(*args, **kwargs)[source]

Bases: tensorflow.python.keras.engine.training.Model

call(inputs, training=None, mask=None)[source]
get_recs(inputs, training=False, **kwargs)[source]

Get full predictions on the whole users/items matrix.

Returns

The matrix of predicted values.

get_top_k(preds, train_mask, k=100)[source]
train_step(batch)[source]

Module contents