merlin.models.tf.YoutubeDNNRetrievalModel

merlin.models.tf.YoutubeDNNRetrievalModel()[source]

Build the Youtube-DNN retrieval model. More details of the model can be found in [1].

Example Usage::

model = YoutubeDNNRetrievalModel(schema, num_sampled=100) model.compile(optimizer=”adam”) model.fit(train_data, epochs=10)

References

[1] Covington, Paul, Jay Adams, and Emre Sargin.

“Deep neural networks for youtube recommendations.” Proceedings of the 10th ACM conference on recommender systems. 2016.

Parameters
  • schema (Schema) – The Schema with the input features

  • aggregation (str) – The aggregation method to use for the sequence of features. Defaults to concat.

  • top_block (Block) – The Block that combines the top features

  • num_sampled (int) – The number of negative samples to use in the sampled-softmax. Defaults to 100.

  • loss (Optional[LossType]) – Loss function. Defaults to categorical_crossentropy.

  • metrics (List[Metric]) – List of metrics to use. Defaults to ranking_metrics(top_ks=[10])

  • l2_normalization (bool) – Whether to apply L2 normalization before computing dot interactions. Defaults to True.

  • extra_pre_call (Optional[Block]) – The optional Block to apply before the model.

  • task_block (Optional[Block]) – The optional Block to apply on the model.

  • logits_temperature (float) – Parameter used to reduce model overconfidence, so that logits / T. Defaults to 1.

  • seq_aggregator (Block) – The Block to aggregate the sequence of features.