예제 #1
0
 def test_get_labels(self):
     a = LocalEncodedAngle(segments=2)
     m = a.fit_transform([METHANE])
     labels = a.get_labels()
     self.assertEqual(m.shape[2], len(labels))
     expected = (
         'C-H_0.0', 'C-H_3.14159',
         'H-H_0.0', 'H-H_3.14159',
     )
     self.assertEqual(labels, expected)
예제 #2
0
파일: test_atom.py 프로젝트: zizai/molml
 def test_get_labels(self):
     a = LocalEncodedAngle(segments=2)
     m = a.fit_transform([METHANE])
     labels = a.get_labels()
     self.assertEqual(m.shape[2], len(labels))
     expected = (
         'C-H_0.0',
         'C-H_3.14159',
         'H-H_0.0',
         'H-H_3.14159',
     )
     self.assertEqual(labels, expected)
예제 #3
0
파일: test_atom.py 프로젝트: zizai/molml
 def test_form0(self):
     a = LocalEncodedAngle(form=0)
     m = a.fit_transform([METHANE])
     self.assertEqual(m.shape, (1, 5, 100))
예제 #4
0
파일: test_atom.py 프로젝트: zizai/molml
 def test_transform_invalid_smoothing(self):
     a = LocalEncodedAngle(smoothing='not real"')
     with self.assertRaises(KeyError):
         a.fit_transform(ALL_DATA)
예제 #5
0
 def test_form0(self):
     a = LocalEncodedAngle(form=0)
     m = a.fit_transform([METHANE])
     self.assertEqual(m.shape, (1, 5, 100))
예제 #6
0
 def test_transform_invalid_smoothing(self):
     a = LocalEncodedAngle(smoothing='not real"')
     with self.assertRaises(KeyError):
         a.fit_transform(ALL_DATA)