示例#1
0
 def _convert_instances_(self, X, Y):
     logger.debug("Creating the Dataset")
     garbage, x1, x2, y_double, garbage = generate_complete_pairwise_dataset(
         X, Y)
     del garbage
     logger.debug("Finished the Dataset instances {}".format(x1.shape[0]))
     return x1, x2, y_double
示例#2
0
 def _convert_instances(self, X, Y):
     self.logger.debug('Creating the Dataset')
     garbage, x1, x2, 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
示例#3
0
 def _convert_instances_(self, X, Y):
     self.logger.debug("Creating the Dataset")
     garbage, x1, x2, garbage, y_single = generate_complete_pairwise_dataset(
         X, Y)
     del garbage
     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_single = y_single[indices]
     self.logger.debug("Finished the Dataset instances {}".format(
         x1.shape[0]))
     return x1, x2, y_single