pep8 fixes in noise ceiling test suite
@@ -12,6 +12,7 @@ from parameterized import parameterized
class TestNoiseCeiling(unittest.TestCase):
+
def test_cv_noise_ceiling(self):
from pyrsa.inference import cv_noise_ceiling
from pyrsa.inference import sets_k_fold_rdm
@@ -21,15 +22,15 @@ class TestNoiseCeiling(unittest.TestCase):
des = {'subj': 0}
rdm_des = {'session':np.array([1, 1, 2, 2, 4, 5, 6, 7, 7, 7, 7])}
pattern_des = {'type':np.array([0, 1, 2, 2, 4])}
- rdms = RDMs(dissimilarities=dis,
+ rdms = RDMs(
+ dissimilarities=dis,
rdm_descriptors=rdm_des,
pattern_descriptors=pattern_des,
dissimilarity_measure=mes,
- descriptors=des)
- train_set, test_set, ceil_set = sets_k_fold_rdm(rdms, k_rdm=3,
- random=False)
- noise_min, noise_max = cv_noise_ceiling(rdms, ceil_set, test_set,
- method='cosine')
+ descriptors=des
+ )
+ _, test_set, ceil_set = sets_k_fold_rdm(rdms, k_rdm=3, random=False)
+ _, _ = cv_noise_ceiling(rdms, ceil_set, test_set, method='cosine')
@parameterized.expand([
['cosine'],
@@ -46,9 +47,11 @@ class TestNoiseCeiling(unittest.TestCase):
des = {'subj': 0}
rdm_des = {'session': np.array([1, 1, 2, 2, 4, 5, 6, 7, 7, 7, 7])}
pattern_des = {'type': np.array([0, 1, 2, 2, 4])}
- rdms = RDMs(dissimilarities=dis,
+ rdms = RDMs(
+ dissimilarities=dis,
rdm_descriptors=rdm_des,
pattern_descriptors=pattern_des,
dissimilarity_measure=mes,
- descriptors=des)
- noise_min, noise_max = boot_noise_ceiling(rdms, method=method)
+ descriptors=des
+ )
+ _, _ = boot_noise_ceiling(rdms, method=method)
