elliot.recommender.visual_recommenders.ACF package

Submodules

elliot.recommender.visual_recommenders.ACF.ACF module

Module description:

class elliot.recommender.visual_recommenders.ACF.ACF.ACF(data, config, params, *args, **kwargs)[source]

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

Attentive Collaborative Filtering: Multimedia Recommendation with Item- and Component-Level Attention

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

  • layers_component – Tuple with number of units for each attentive layer (component-level)

  • layers_item – Tuple with number of units for each attentive layer (item-level)

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

models:
  ACF:
    meta:
      save_recs: True
    lr: 0.0005
    epochs: 50
    factors: 100
    batch_size: 128
    l_w: 0.000025
    layers_component: (64, 1)
    layers_item: (64, 1)
get_recommendations(k: int = 100)[source]
property name
train()[source]

elliot.recommender.visual_recommenders.ACF.ACF_model module

Module description:

class elliot.recommender.visual_recommenders.ACF.ACF_model.ACFModel(*args, **kwargs)[source]

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

call(inputs, training=None, mask=None)[source]
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.

get_top_k(preds, train_mask, k=100)[source]
predict(user, user_pos, feat_pos)[source]
train_step(batch)[source]

Module contents

Module description: