From 32ade6420d41efd06ade45cb8c5e412f68b60fad Mon Sep 17 00:00:00 2001
From: Nikolai Hartmann <Nikolai.Hartmann@physik.uni-muenchen.de>
Date: Mon, 10 Sep 2018 11:20:06 +0200
Subject: [PATCH] remove shuffle_training_data function

---
 toolkit.py | 29 -----------------------------
 1 file changed, 29 deletions(-)

diff --git a/toolkit.py b/toolkit.py
index 51efd3f..cc479a4 100755
--- a/toolkit.py
+++ b/toolkit.py
@@ -802,35 +802,6 @@ class ClassificationProject(object):
             self._transform_data()
 
 
-    def shuffle_training_data(self):
-
-        if not self.data_loaded:
-            raise ValueError("Data not loaded! can't shuffle training data!")
-
-        if self.data_shuffled:
-            logger.warning("Data already shuffled, won't shuffle again")
-
-        np.random.seed(self.shuffle_seed)
-
-        # touch property to make sure it is created
-        # before shuffling the inputs!
-        self.w_train_tot
-
-        rn_state = np.random.get_state()
-        np.random.shuffle(self.x_train)
-        np.random.set_state(rn_state)
-        np.random.shuffle(self.y_train)
-        np.random.set_state(rn_state)
-        np.random.shuffle(self.w_train)
-        np.random.set_state(rn_state)
-        np.random.shuffle(self.w_train_tot)
-        if self._scores_train is not None:
-            logger.info("Shuffling scores, since they are also there")
-            np.random.set_state(rn_state)
-            np.random.shuffle(self._scores_train)
-        self.data_shuffled = True
-
-
     @property
     def w_train_tot(self):
         "(sample weight * class weight), divided by mean"
-- 
GitLab