--- title: SiReN keywords: fastai sidebar: home_sidebar summary: "Sign-Aware Recommendation Systems with Graph Neural Networks (SiReN)." description: "Sign-Aware Recommendation Systems with Graph Neural Networks (SiReN)." nb_path: "nbs/models/models.siren.ipynb" ---
import pandas as pd
train = pd.DataFrame(
{'userId':[1,1,2,2,3,4,5],
'itemId':[1,2,1,3,2,4,5],
'rating':[4,5,2,5,3,2,4]}
)
train
model = SiReN(train,
num_u = 5,
num_v = 5,
offset = 3.5,
num_layers = 1,
MLP_layers = 1,
dim = 2,
reg = 1e-4,
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu"),
graph_enc = 'lightgcn',
user_col = 'userId',
item_col = 'itemId',
rating_col = 'rating')
torch.random.manual_seed(0)
model.aggregate()