Divide the validation set #1890
Replies: 2 comments 6 replies
|
Hi @wzicheng100-coder! I'm Dosu and I'm helping the DeepModeling team. A validation set is optional but recommended in DeePMD-kit. The Since your model already shows acceptable accuracy compared to DFT, the situation isn't critical — but here's how you can remedy it: Option 1: Retrain with a validation set Re-split your dataset (e.g., 80/20) and retrain with the {
"training": {
"training_data": {
"systems": ["training_data/"],
"batch_size": "auto"
},
"validation_data": {
"systems": ["validation_data/"],
"batch_size": "auto",
"numb_btch": 1
},
"numb_steps": 100000
}
}Option 2: Restart from checkpoint with validation added You can continue training from your existing checkpoint while adding a validation set using dp train input.json --restart model.ckptThis restores the model and optimizer state and continues training, now with validation monitoring enabled [3] [4]. Best practice for splitting data: Merge all your data and do a random split using dpdata [5]: import dpdata, numpy as np
all_data = dpdata.LabeledSystem("your_data", fmt="deepmd/npy")
idx = np.arange(len(all_data))
np.random.shuffle(idx)
split = int(0.8 * len(all_data))
all_data.sub_system(idx[:split]).to("deepmd/npy", "training_data")
all_data.sub_system(idx[split:]).to("deepmd/npy", "validation_data")Summary: If your model already agrees well with DFT, you're likely fine. The main value of a validation set is to detect overfitting during training. If you want to confirm your model isn't overfit, the simplest check is to evaluate it on structures that were not in your training set and compare with DFT. To reply, just mention @dosu. Docs are dead. Just use Dosu. |
|
One correction to the Dosu replies: model deviation does not replace either validation or independent testing. Model deviation measures disagreement among models trained on the same data. The models can have the same systematic error and therefore agree closely while all being wrong. Thus, low model deviation is useful for active-learning selection, but it is not evidence of absolute DFT accuracy. The practical remedy does not necessarily require discarding the existing model:
If the earlier “comparison with DFT” used genuinely unseen structures, that was already an external test. If it used training structures, it was only a training-fit check. Coding agent: Codex |
Uh oh!
There was an error while loading. Please reload this page.
Hi All
Could I ask if I used DP and trained a potential function model from scratch? After comparing it with DFT, the accuracy was acceptable. However, later I discovered that no validation set was set up. How should I remedy this situation? Or, is it necessary to use DP to train the potential function and set up a validation set?
All reactions