diff --git a/Code/MonoMultiViewClassifiers/Multiview/Fusion/Methods/LateFusionPackage/SCMForLinear.py b/Code/MonoMultiViewClassifiers/Multiview/Fusion/Methods/LateFusionPackage/SCMForLinear.py index d4b6980c1dcd52b580c622a458b95c06bcb425a6..29a879d4ddcdbb2f757df2a7e71bf8bf1eb3d1dc 100644 --- a/Code/MonoMultiViewClassifiers/Multiview/Fusion/Methods/LateFusionPackage/SCMForLinear.py +++ b/Code/MonoMultiViewClassifiers/Multiview/Fusion/Methods/LateFusionPackage/SCMForLinear.py @@ -62,7 +62,7 @@ def genParamsSets(classificationKWARGS, randomState, nIter=1): max_attributes = randomState.randint(1, 20) p = randomState.random_sample() model = randomState.choice(["conjunction", "disjunction"]) - order = randomState.randint(1, nbView) + order = randomState.randint(1, 10) paramsSets.append([p, max_attributes, model, order]) return paramsSets @@ -123,7 +123,6 @@ class SCMForLinear(LateFusionClassifier): self.p = paramsSet[0] self.maxAttributes = paramsSet[1] self.order = paramsSet[3] - self.order = 2 self.modelType = paramsSet[2] def fit_hdf5(self, DATASET, trainIndices=None, viewsIndices=None): diff --git a/Code/Tests/Test_utils/test_execution.py b/Code/Tests/Test_utils/test_execution.py index 0540a0d7dc3ff666c91d5734727e7cb4e105b65b..39984b898abdaf9149b9c886258c917319b04b18 100644 --- a/Code/Tests/Test_utils/test_execution.py +++ b/Code/Tests/Test_utils/test_execution.py @@ -71,3 +71,13 @@ class Test_genSplits(unittest.TestCase): self.assertGreater(len(np.where(self.labels[self.test_indices]==0)[0]), 0) self.assertGreater(len(np.where(self.labels[self.train_indices]==1)[0]), 0) self.assertGreater(len(np.where(self.labels[self.test_indices]==1)[0]), 0) + +class Test_genKFolds(unittest.TestCase): + + def setUp(self): + self.statsIter = 2 + self.nbFolds = 5 + self.statsIterRandomStates = [np.random.RandomState(42), np.random.RandomState(94)] + + def test_genKFolds_iter(self): + pass