Coder-Yu / QRec

QRec: A Python Framework for quick implementation of recommender systems (TensorFlow Based)
1.59k stars 406 forks source link

How to set training stop condition #244

Closed ll0ruc closed 2 years ago

ll0ruc commented 2 years ago

In cross-validation mode, how to choose the maxEpoch? I notice that in model MHCN.py, you choose maxEpoch = 120, 30, 30 for dataset LastFM, Yelp, Douban. And choose the best performance on testset during maxEpoch. While I found that the best performance was taken in the last epoch[120 or close to 120]. Does it mean the model needs to continue training? And for other model, how to choose the maxEpoch in the same dataset?

Coder-Yu commented 2 years ago

The maxEpoch provided in mhcn.py is suggested numbers which I used. You can continue training but according to my experience, the best performance has been reached within 120, 30, 30 epochs. In the current version, the early stop mechanism hasn't been provided. I usually set a large maxepoch and record the performance for every epoch. Once the best performance has remained unchanged for 20 epochs (it depends. Sometimes a few methods like LightGCN may take more epochs to jump out the local minimum). I will stop the training.

ll0ruc commented 2 years ago

OK, Thank you for replying!