def classification_task(self): X = [[ m['sepal_length'], m['sepal_width'], m['petal_length'], m['petal_width'] ] for m in self.meta] y = utils.int_labels([m['name'] for m in self.meta]) return np.asarray(X), np.asarray(y)
def raw_classification_task(self, split=None): """Return image_paths, labels""" if split: inds = self.splits[split] else: inds = xrange(len(self.meta)) image_paths = [self.meta[ind]["filename"] for ind in inds] names = np.asarray([self.meta[ind]["name"] for ind in inds]) labels = int_labels(names) return image_paths, labels
def raw_classification_task(self, split=None): """ :param split: an integer from 0 to 9 inclusive. :param split_role: either 'train' or 'test' :returns: either all samples (when split_k=None) or the specific train/test split """ if split is not None: inds = self.classification_splits[split] else: inds = range(len(self.meta)) names = self.names[inds] paths = [self.meta[ind]['filename'] for ind in inds] labels = int_labels(names) return paths, labels, inds
def raw_recognition_task(self): """Return image_paths, labels""" image_paths = [self.image_path(m) for m in self.meta] names = np.asarray([m["name"] for m in self.meta]) labels = utils.int_labels(names) return image_paths, labels
def raw_gender_task(self): genders = [m['gender'] for m in self.meta] paths = [self.image_path(m) for m in self.meta] return paths, utils.int_labels(genders)
def raw_recognition_task(self): names = [m['name'] for m in self.meta] paths = [self.image_path(m) for m in self.meta] labels = utils.int_labels(names) return paths, labels
def classification_task(self): X = [[m['sepal_length'], m['sepal_width'], m['petal_length'], m['petal_width']] for m in self.meta] y = utils.int_labels([m['name'] for m in self.meta]) return np.asarray(X), np.asarray(y)
def raw_classification_task(self): """Return image_paths, labels""" image_paths = [self.image_path(m) for m in self.meta] names = np.asarray([m['name'] for m in self.meta]) labels = utils.int_labels(names) return image_paths, labels
def raw_recognition_task(self): """Return image_paths, labels""" image_paths = [self.image_path(m) for m in self.meta] names = np.asarray([m['name'] for m in self.meta]) labels = utils.int_labels(names) return image_paths, labels