data_processor.py
def preprocess_data_by_label(self):
        """Simulation data is organized by label. This method mixes and splits up the data."""
        for i in range(self.n_classes):
            modified_data_path = os.path.join(SIM_DATA_PATH, str(i))
            class_files = self._create_filename_list(modified_data_path)

            # get files for each thing
            result = self._split_datafiles(class_files)    # train_set, val_set, test_set
            self.train_files.extend(result[0])
            self.val_files.extend(result[1])
            self.test_files.extend(result[2])
            self.logger.debug('%d/%d/%d added to train/val/test set from class %d.',
                              len(result[0]), len(result[1]),
                              len(result[2]), i)

        # Shuffle data
        np.random.shuffle(self.train_files)
        np.random.shuffle(self.val_files)
        np.random.shuffle(self.test_files)

        # Report sizes and load all datasets
        self.logger.info('Train set size: %d', len(self.train_files))
        self.logger.info('Validation set size: %d', len(self.val_files))
        self.logger.info('Test set size: %d', len(self.test_files))
        self._load_all_datasets()
Simulation data is organized by label. This method mixes and splits up the data.
Simulation data is organized by label. This method mixes and splits up the data.
Simulation data is organized by label . This method mixes and splits up the data .
def preprocess_data_by_label(self):
        for i in range(self.n_classes):
            modified_data_path = os.path.join(SIM_DATA_PATH, str(i))
            class_files = self._create_filename_list(modified_data_path)
            result = self._split_datafiles(class_files)    
            self.train_files.extend(result[0])
            self.val_files.extend(result[1])
            self.test_files.extend(result[2])
            self.logger.debug('%d/%d/%d added to train/val/test set from class %d.',
                              len(result[0]), len(result[1]),
                              len(result[2]), i)
        np.random.shuffle(self.train_files)
        np.random.shuffle(self.val_files)
        np.random.shuffle(self.test_files)
        self.logger.info('Train set size: %d', len(self.train_files))
        self.logger.info('Validation set size: %d', len(self.val_files))
        self.logger.info('Test set size: %d', len(self.test_files))
        self._load_all_datasets()
def preprocess_data_by_label ( self ) : for i in range ( self . n_classes ) : modified_data_path = os . path . join ( SIM_DATA_PATH , str ( i ) ) class_files = self . _create_filename_list ( modified_data_path ) result = self . _split_datafiles ( class_files ) self . train_files . extend ( result [ 0 ] ) self . val_files . extend ( result [ 1 ] ) self . test_files . extend ( result [ 2 ] ) self . logger . debug ( '%d/%d/%d added to train/val/test set from class %d.' , len ( result [ 0 ] ) , len ( result [ 1 ] ) , len ( result [ 2 ] ) , i ) np . random . shuffle ( self . train_files ) np . random . shuffle ( self . val_files ) np . random . shuffle ( self . test_files ) self . logger . info ( 'Train set size: %d' , len ( self . train_files ) ) self . logger . info ( 'Validation set size: %d' , len ( self . val_files ) ) self . logger . info ( 'Test set size: %d' , len ( self . test_files ) ) self . _load_all_datasets ( )
Simulation data is organized by label.
Simulation data is organized by label .
"""Simulation data is organized by label. This method mixes and splits up the data.""" # get files for each thing # train_set, val_set, test_set # Shuffle data # Report sizes and load all datasets
self