Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hotfixing a problem with DOS comparison in the Tester class #493

Merged

Conversation

RandomDefaultUser
Copy link
Member

@timcallow found the bug, this should fix it.

@timcallow
Copy link
Contributor

@RandomDefaultUser sorry for the late response. It seems the function is working as intended, i.e. there is no bug. In that respect it is ready to be merged.

However, there is more a conceptual issue with the choice of error function. I noticed this when training models with mixed numbers of bands, in this 576 and 600 (this wasn't really deliberate, just sort of happened). In this case, the DOS is always basically "very good" but the energy cut-off for the DOS differs. This leads to a sort of asymmetry in the error depending on whether it's tested on a snapshot with 576 or 600 bands, which is best seen from the attached images.

One of the errors seen in these images is also quite large - 20%. This is entirely caused by the different cut-offs. It also doesn't affect the physics of the problem: consider the images where the DOS is multiplied by the occupations. As the Fermi energy is lower than the DOS cut-off energy, these different cut-offs don't affect the DOS * occupations, which is actually of more importance physically.

In any case, I'd say it can be merged, since technically it does work as expected. However we might want to think about defining it differently in future, and maybe it's worth raising an issue (feel free to assign it to me).

Screenshot from 2023-12-13 17-34-43
Screenshot from 2023-12-13 17-34-25
Screenshot from 2023-12-13 17-35-12
Screenshot from 2023-12-13 17-34-58

@RandomDefaultUser
Copy link
Member Author

Thanks for the feedback @timcallow ! Should we maybe revert to the symmetric MAPE again? We already had that in the middle of the bugfixing process, maybe it is wise to go back? That would fix the problem, wouldn't it?

@RandomDefaultUser
Copy link
Member Author

After some additional discussion with @timcallow we decided to implement a symmetric MAPE with a small number added to both predicted and actual value of the DOS to reduce numerical noise.
While not optimal, I think this quantity is the best option we have for DOS comparisons at the moment.

@RandomDefaultUser RandomDefaultUser merged commit 9b0c4fc into mala-project:develop Feb 23, 2024
5 checks passed
@RandomDefaultUser RandomDefaultUser deleted the fix_dos_testing branch February 23, 2024 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants