1318c197cfe2de1939e8679b2ffa4e880f0e654c,Orange/tests/test_distances.py,TestMahalanobis,test_attributes,#TestMahalanobis#,755
Before Change
self.assertAlmostEqual(d[i][j], mah(self.x[i], self.x[j]), delta=1e-5)
def test_attributes(self):
Mahalanobis.fit(self.x)
self.assertEqual(Mahalanobis(self.x[0], self.x[1]).shape, (1, 1))
self.assertEqual(Mahalanobis(self.x).shape, (self.n, self.n))
self.assertEqual(Mahalanobis(self.x[0:3], self.x[5:7]).shape, (3, 2))
self.assertEqual(Mahalanobis(self.x1, self.x2).shape, (1, 1))
After Change
self.assertAlmostEqual(d[i][j], mah(self.x[i], self.x[j]), delta=1e-5)
def test_attributes(self):
metric = MahalanobisDistance(self.x)
self.assertEqual(metric(self.x[0], self.x[1]).shape, (1, 1))
self.assertEqual(metric(self.x).shape, (self.n, self.n))
self.assertEqual(metric(self.x[0:3], self.x[5:7]).shape, (3, 2))
self.assertEqual(metric(self.x1, self.x2).shape, (1, 1))
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: biolab/orange3
Commit Name: 1318c197cfe2de1939e8679b2ffa4e880f0e654c
Time: 2017-05-12
Author: ales.erjavec@fri.uni-lj.si
File Name: Orange/tests/test_distances.py
Class Name: TestMahalanobis
Method Name: test_attributes
Project Name: biolab/orange3
Commit Name: 1318c197cfe2de1939e8679b2ffa4e880f0e654c
Time: 2017-05-12
Author: ales.erjavec@fri.uni-lj.si
File Name: Orange/widgets/unsupervised/owdistances.py
Class Name: OWDistances
Method Name: compute_distances
Project Name: biolab/orange3
Commit Name: 1318c197cfe2de1939e8679b2ffa4e880f0e654c
Time: 2017-05-12
Author: ales.erjavec@fri.uni-lj.si
File Name: Orange/widgets/unsupervised/tests/test_owdistances.py
Class Name: TestOWDistances
Method Name: test_distance_combo