elliot.recommender.graph_based.ngcf package¶
Submodules¶
elliot.recommender.graph_based.ngcf.NGCF module¶
Module description:
-
class
elliot.recommender.graph_based.ngcf.NGCF.
NGCF
(data, config, params, *args, **kwargs)[source]¶ Bases:
elliot.recommender.recommender_utils_mixin.RecMixin
,elliot.recommender.base_recommender_model.BaseRecommenderModel
Neural Graph Collaborative Filtering
For further details, please refer to the paper
- Parameters
lr – Learning rate
epochs – Number of epochs
factors – Number of latent factors
batch_size – Batch size
l_w – Regularization coefficient
weight_size – Tuple with number of units for each embedding propagation layer
node_dropout – Tuple with dropout rate for each node
message_dropout – Tuple with dropout rate for each embedding propagation layer
n_fold – Number of folds to split the adjacency matrix into sub-matrices and ease the computation
To include the recommendation model, add it to the config file adopting the following pattern:
models: NGCF: meta: save_recs: True lr: 0.0005 epochs: 50 batch_size: 512 factors: 64 batch_size: 256 l_w: 0.1 weight_size: (64,) node_dropout: () message_dropout: (0.1,) n_fold: 5
-
property
name
¶
elliot.recommender.graph_based.ngcf.NGCF_model module¶
Module description:
-
class
elliot.recommender.graph_based.ngcf.NGCF_model.
NGCFModel
(*args, **kwargs)[source]¶ Bases:
tensorflow.python.keras.engine.training.Model
-
call
(inputs, **kwargs)[source]¶ Generates prediction for passed users and items indices
- Parameters
inputs – user, item (batch)
Network in training mode or inference mode. (the) –
- Returns
prediction and extracted model parameters
-
get_config
()[source]¶ Returns the config of the layer.
A layer config is a Python dictionary (serializable) containing the configuration of a layer. The same layer can be reinstantiated later (without its trained weights) from this configuration.
The config of a layer does not include connectivity information, nor the layer class name. These are handled by Network (one layer of abstraction above).
- Returns
Python dictionary.
-