openkim / kliff

KIM-based Learning-Integrated Fitting Framework for interatomic potentials.
https://kliff.readthedocs.io
GNU Lesser General Public License v2.1
34 stars 20 forks source link

Model training with cross validation #78

Open michaelmacisaac opened 1 year ago

michaelmacisaac commented 1 year ago

Kliff community, I have been developing an NN MLP for SiC and during my MLP development I have modified some of the source code as well as developed some functions that I think might be advantageous for future NN MLP development. A simple one is saving the model only when validation error decreases to mitigate overfitting. Unsure if this functionality exists, but if it doesn't I believe it may be helpful. I'd be happy to share my implementation if you believe it is helpful.

mjwen commented 1 year ago

The currently training loop only uses the training set, and saves the model periodically (e.g. every 10 epochs). No validation is performed during the training.

Yes, it is better to save the best N models against a validation set along the training. So, can you please go and make a Pull Request of your implementation?