hopwise.model.general_recommender.ease

Reference:

Harald Steck. “Embarrassingly Shallow Autoencoders for Sparse Data” in WWW 2019.

Classes

EASE

EASE is a linear model for collaborative filtering, which combines the

Module Contents

class hopwise.model.general_recommender.ease.EASE(config, dataset)

Bases: hopwise.model.abstract_recommender.GeneralRecommender

EASE is a linear model for collaborative filtering, which combines the strengths of auto-encoders and neighborhood-based approaches.

input_type
type
dummy_param
item_similarity
interaction_matrix
other_parameter_name = ['interaction_matrix', 'item_similarity']
device
forward()
calculate_loss(interaction)

Calculate the training loss for a batch data.

Parameters:

interaction (Interaction) – Interaction class of the batch.

Returns:

Training loss, shape: []

Return type:

torch.Tensor

predict(interaction)

Predict the scores between users and items.

Parameters:

interaction (Interaction) – Interaction class of the batch.

Returns:

Predicted scores for given users and items, shape: [batch_size]

Return type:

torch.Tensor

full_sort_predict(interaction)

Full sort prediction function. Given users, calculate the scores between users and all candidate items.

Parameters:

interaction (Interaction) – Interaction class of the batch.

Returns:

Predicted scores for given users and all candidate items, shape: [n_batch_users * n_candidate_items]

Return type:

torch.Tensor