Skip to content

Commit

Permalink
Changed parameters to align with paper and ngcf
Browse files Browse the repository at this point in the history
  • Loading branch information
darrylong committed Oct 14, 2023
1 parent 0945794 commit 8120973
Showing 1 changed file with 4 additions and 16 deletions.
20 changes: 4 additions & 16 deletions examples/lightgcn_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,25 +33,13 @@
rating_threshold=0.5,
)

lightgcn1 = cornac.models.LightGCN1(
name="LightGCN-old",
seed=123,
num_epochs=2000,
num_layers=3,
early_stopping={"min_delta": 1e-4, "patience": 3},
train_batch_size=256,
learning_rate=0.001,
lambda_reg=1e-4,
verbose=True
)

# Instantiate the LightGCN model
lightgcn = cornac.models.LightGCN(
seed=123,
num_epochs=2000,
num_epochs=1000,
num_layers=3,
early_stopping={"min_delta": 1e-4, "patience": 3},
train_batch_size=256,
early_stopping={"min_delta": 1e-4, "patience": 50},
train_batch_size=1024,
learning_rate=0.001,
lambda_reg=1e-4,
verbose=True
Expand All @@ -64,7 +52,7 @@
# Put everything together into an experiment and run it
cornac.Experiment(
eval_method=ratio_split,
models=[lightgcn1, lightgcn],
models=[lightgcn],
metrics=[rec_20, ndcg_20],
user_based=True,
).run()

0 comments on commit 8120973

Please sign in to comment.