From 8120973f624a66c591fa4a1f344953f4c10560f3 Mon Sep 17 00:00:00 2001 From: Darryl Ong Date: Sun, 15 Oct 2023 00:41:12 +0800 Subject: [PATCH] Changed parameters to align with paper and ngcf --- examples/lightgcn_example.py | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/examples/lightgcn_example.py b/examples/lightgcn_example.py index 004130fd4..b91660063 100644 --- a/examples/lightgcn_example.py +++ b/examples/lightgcn_example.py @@ -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 @@ -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()