def convert_instances(self, X, Y): self.logger.debug('Creating the Dataset') garbage, garbage, x_train, garbage, y_single = generate_complete_pairwise_dataset( X, Y) del garbage assert x_train.shape[1] == self.n_object_features self.logger.debug('Finished the Dataset with instances {}'.format( x_train.shape[0])) return x_train, y_single
def _convert_instances(self, X, Y): self.logger.debug('Creating the Dataset') x1, x2, garbage, y_double, garbage = generate_complete_pairwise_dataset(X, Y) del garbage self.logger.debug('Finished the Dataset') if x1.shape[0] > self.threshold_instances: indices = self.random_state.choice(x1.shape[0], self.threshold_instances, replace=False) x1 = x1[indices, :] x2 = x2[indices, :] y_double = y_double[indices, :] return x1, x2, y_double