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)
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)
def test_form0(self): a = LocalEncodedAngle(form=0) m = a.fit_transform([METHANE]) self.assertEqual(m.shape, (1, 5, 100))
def test_transform_invalid_smoothing(self): a = LocalEncodedAngle(smoothing='not real"') with self.assertRaises(KeyError): a.fit_transform(ALL_DATA)
def test_form0(self): a = LocalEncodedAngle(form=0) m = a.fit_transform([METHANE]) self.assertEqual(m.shape, (1, 5, 100))
def test_transform_invalid_smoothing(self): a = LocalEncodedAngle(smoothing='not real"') with self.assertRaises(KeyError): a.fit_transform(ALL_DATA)