[FEAT] add additional test in mds to test for differences
@@ -41,7 +41,7 @@ class TestVIS(unittest.TestCase):
rdms = rsr.RDMs(dissimilarities=dis,
dissimilarity_measure=mes,
descriptors=des)
- mds_emb = rsv.weighted_mds(rdms, weight=wes)
+ mds_emb = rsv.mds(rdms, weight=wes)
self.assertEqual(mds_emb.shape, (8, 5, 2))
def test_vis_3d_weighted_mds_output_shape_corresponds_to_inputs(self):
@@ -52,8 +52,32 @@ class TestVIS(unittest.TestCase):
rdms = rsr.RDMs(dissimilarities=dis,
dissimilarity_measure=mes,
descriptors=des)
- mds_emb = rsv.weighted_mds(rdms,dim=3, weight=wes)
+ mds_emb = rsv.mds(rdms,dim=3, weight=wes)
self.assertEqual(mds_emb.shape, (8, 5, 3))
+ def test_vis_weighted_mds_output_behaves_like_mds(self):
+ dis = np.random.rand(8, 10)
+ wes = np.random.ones((8,10))
+ mes = "Euclidean"
+ des = {'session': 0, 'subj': 0}
+ rdms = rsr.RDMs(dissimilarities=dis,
+ dissimilarity_measure=mes,
+ descriptors=des)
+ mds_emb = rsv.mds(rdms)
+ wmds_emb = rsv.mds(rdms, weight=wes)
+ self.assertEqual(mds_emb, wmds_emb)
+
+ def test_vis_3d_weighted_mds_output_behaves_like_mds(self):
+ dis = np.random.rand(8, 10)
+ wes = np.random.ones((8,10))
+ mes = "Euclidean"
+ des = {'session': 0, 'subj': 0}
+ rdms = rsr.RDMs(dissimilarities=dis,
+ dissimilarity_measure=mes,
+ descriptors=des)
+ mds_emb = rsv.mds(rdms,dim=3)
+ wmds_emb = rsv.mds(rdms,dim=3, weight=wes)
+ self.assertEqual(mds_emb, wmds_emb)
+
if __name__ == '__main__':
unittest.main()
