utils/kdd_parser.py
def save_data(self, outDir):
        """Save the training and test data to outDir
        """
        # create outDir if it does not exist
        if not os.path.exists(outDir):
            os.makedirs(outDir)

        train_data_file = os.path.join(outDir, 'train_data')
        np.save(train_data_file, self.train_data)

        train_labels_file = os.path.join(outDir, 'train_labels_{}'.format(self.label_type))
        np.save(train_labels_file, self.train_labels)

        test_data_file = os.path.join(outDir, 'test_data')
        np.save(test_data_file, self.test_data)

        test_labels_file = os.path.join(outDir, 'test_labels_{}'.format(self.label_type))
        np.save(test_labels_file, self.test_labels)
Save the training and test data to outDir
        
Save the training and test data to outDir
Save the training and test data to outDir
def save_data(self, outDir):
        if not os.path.exists(outDir):
            os.makedirs(outDir)
        train_data_file = os.path.join(outDir, 'train_data')
        np.save(train_data_file, self.train_data)
        train_labels_file = os.path.join(outDir, 'train_labels_{}'.format(self.label_type))
        np.save(train_labels_file, self.train_labels)
        test_data_file = os.path.join(outDir, 'test_data')
        np.save(test_data_file, self.test_data)
        test_labels_file = os.path.join(outDir, 'test_labels_{}'.format(self.label_type))
        np.save(test_labels_file, self.test_labels)
def save_data ( self , outDir ) : if not os . path . exists ( outDir ) : os . makedirs ( outDir ) train_data_file = os . path . join ( outDir , 'train_data' ) np . save ( train_data_file , self . train_data ) train_labels_file = os . path . join ( outDir , 'train_labels_{}' . format ( self . label_type ) ) np . save ( train_labels_file , self . train_labels ) test_data_file = os . path . join ( outDir , 'test_data' ) np . save ( test_data_file , self . test_data ) test_labels_file = os . path . join ( outDir , 'test_labels_{}' . format ( self . label_type ) ) np . save ( test_labels_file , self . test_labels )
Save the training and test data to outDir
Save the training and test data to outDir
"""Save the training and test data to outDir
        """ # create outDir if it does not exist
self
outDir