From b3ca1424dea9103e656d155ce3cb6bf70fe89134 Mon Sep 17 00:00:00 2001 From: amkrajewski Date: Fri, 27 Oct 2023 13:48:02 -0400 Subject: [PATCH] (randSol) added 1e-6 to the feature accuracy bounds to handle numerical instability error which occurred occasionally --- pysipfenn/tests/test_KS2022_randomSolution.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pysipfenn/tests/test_KS2022_randomSolution.py b/pysipfenn/tests/test_KS2022_randomSolution.py index 02d0543..45ac2a5 100644 --- a/pysipfenn/tests/test_KS2022_randomSolution.py +++ b/pysipfenn/tests/test_KS2022_randomSolution.py @@ -37,8 +37,8 @@ def test_results(self): self.descriptorMeanList, self.labels): with self.subTest(msg=f'{label} in BCC alloy'): - self.assertGreaterEqual(testValue, (0.98*descriptorMean)-descriptorRange) - self.assertLessEqual(testValue, (1.02*descriptorMean)+descriptorRange) + self.assertGreaterEqual(testValue, (0.98*descriptorMean)-descriptorRange-1e-6) + self.assertLessEqual(testValue, (1.02*descriptorMean)+descriptorRange+1e-6) for field in ['diffHistory', 'propHistory', 'finalAtomsN', 'finalCompositionDistance']: with self.subTest(msg=f'{field} present in meta'):