Skip to content
Snippets Groups Projects
Commit 30834ac9 authored by Dominique Benielli's avatar Dominique Benielli
Browse files

merge

parent 04dcbef5
Branches
Tags
No related merge requests found
Pipeline #3391 failed
......@@ -77,13 +77,9 @@ class Test_initTrainTest(unittest.TestCase):
np.array([1, 3, 5, 7, 9])]
def test_simple(cls):
<<<<<<< HEAD
X_train, y_train, X_test, y_test, X_test_multiclass = exec_classif_mono_view.initTrainTest(
cls.X, cls.Y, cls.classification_indices)
=======
X_train, y_train, X_test, y_test, X_test_multiclass = exec_classif_mono_view.init_train_test(
cls.X, cls.Y, cls.classificationIndices)
>>>>>>> 7b3e918b4fb2938657cae3093d95b1bd6fc461d4
np.testing.assert_array_equal(X_train, np.array(
[np.array([102, 435, 348, 270, 106]),
np.array([466, 214, 330, 458, 87]),
......
......@@ -26,27 +26,16 @@ class Test_initStatsIterRandomStates(unittest.TestCase):
cls.statsIter = 1
def test_one_statiter(cls):
<<<<<<< HEAD
cls.state = cls.random_state.get_state()[1]
statsIterRandomStates = execution.initStatsIterRandomStates(
cls.statsIter, cls.random_state)
=======
cls.state = cls.randomState.get_state()[1]
statsIterRandomStates = execution.init_stats_iter_random_states(
cls.statsIter, cls.randomState)
>>>>>>> 7b3e918b4fb2938657cae3093d95b1bd6fc461d4
np.testing.assert_array_equal(statsIterRandomStates[0].get_state()[1],
cls.state)
def test_multiple_iter(cls):
cls.statsIter = 3
<<<<<<< HEAD
statsIterRandomStates = execution.initStatsIterRandomStates(
cls.statsIter, cls.random_state)
=======
statsIterRandomStates = execution.init_stats_iter_random_states(
cls.statsIter, cls.randomState)
>>>>>>> 7b3e918b4fb2938657cae3093d95b1bd6fc461d4
cls.assertAlmostEqual(len(statsIterRandomStates), 3)
cls.assertNotEqual(statsIterRandomStates[0].randint(5000),
statsIterRandomStates[1].randint(5000))
......@@ -96,7 +85,6 @@ class Test_initRandomState(unittest.TestCase):
def test_random_state_42(self):
randomState_42 = np.random.RandomState(42)
<<<<<<< HEAD
random_state = execution.initRandomState("42",
"multiview_platform/tests/temp_tests/")
os.remove("multiview_platform/tests/temp_tests/random_state.pickle")
......@@ -110,21 +98,6 @@ class Test_initRandomState(unittest.TestCase):
"multiview_platform/tests/temp_tests/random_state.pickle",
"multiview_platform/tests/temp_tests/")
os.remove("multiview_platform/tests/temp_tests/random_state.pickle")
=======
randomState = execution.init_random_state("42",
"multiview_platform/tests/tmp_tests/")
os.remove("multiview_platform/tests/tmp_tests/randomState.pickle")
np.testing.assert_array_equal(randomState.beta(1, 100, 100),
randomState_42.beta(1, 100, 100))
def test_random_state_pickle(self):
randomState_to_pickle = execution.init_random_state(None,
"multiview_platform/tests/tmp_tests/")
pickled_randomState = execution.init_random_state(
"multiview_platform/tests/tmp_tests/randomState.pickle",
"multiview_platform/tests/tmp_tests/")
os.remove("multiview_platform/tests/tmp_tests/randomState.pickle")
>>>>>>> 7b3e918b4fb2938657cae3093d95b1bd6fc461d4
np.testing.assert_array_equal(randomState_to_pickle.beta(1, 100, 100),
pickled_randomState.beta(1, 100, 100))
......
......@@ -14,4 +14,3 @@ pandas==0.23.3
m2r==0.2.1
docutils==0.12
pyyaml==3.12
\ No newline at end of file
tkinter==8.6
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment