def train_test_split(self):
        '''
        Get a new train-test split of the Corpus' dialogues (each train and
        test samplest is represented by a SampleSet obejct
        '''
        self.log('info', 'Splitting the corpus into train/test subsets ...')

        # grab some hyperparameters from our config
        split = self.config['train-test-split']
        rand_state = self.config['random-state']

        # split the corpus into train and test samples
        # train, test = train_test_split(self.dialogues, train_size=split, random_state=rand_state)
        shuffled = np.random.permutation(self.dialogues)
        split_index = ceil(split * len(self.dialogues))
        train, test = np.split(shuffled, [split_index])
        train = np.copy(train)
        test = np.copy(test)

        train = SampleSet(train, properties=self.properties, enc_dec_splitter=self.enc_dec_splitter)
        train.prepare_sampleset()
        test = SampleSet(test, properties=self.properties, enc_dec_splitter=self.enc_dec_splitter)
        test.prepare_sampleset()

        return train, test
def train_test_split ( self ) : self . log ( 'info' , 'Splitting the corpus into train/test subsets ...' ) split = self . config [ 'train-test-split' ] rand_state = self . config [ 'random-state' ] shuffled = np . random . permutation ( self . dialogues ) split_index = ceil ( split * len ( self . dialogues ) ) train , test = np . split ( shuffled , [ split_index ] ) train = np . copy ( train ) test = np . copy ( test ) train = SampleSet ( train , properties = self . properties , enc_dec_splitter = self . enc_dec_splitter ) train . prepare_sampleset ( ) test = SampleSet ( test , properties = self . properties , enc_dec_splitter = self . enc_dec_splitter ) test . prepare_sampleset ( ) return train , test
Get a new train-test split of the Corpus' dialogues (each train and
        test samplest is represented by a SampleSet obejct