예제 #1
0
 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)
예제 #2
0
파일: fbo.py 프로젝트: yamins81/skdata
 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
예제 #3
0
파일: pubfig83.py 프로젝트: yamins81/skdata
    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
예제 #4
0
파일: lfw.py 프로젝트: zstone/scikits.data
 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
예제 #5
0
 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)
예제 #6
0
 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
예제 #7
0
파일: pubfig83.py 프로젝트: Afey/skdata
 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)
예제 #8
0
파일: pubfig83.py 프로젝트: Afey/skdata
 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
예제 #9
0
 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)
예제 #10
0
 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
예제 #11
0
 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