Esempio n. 1
0
File: tasks.py Progetto: Imdrail/GPy
 def load_data(self):
     from GPy.util.datasets import download_url, data_path
     if not os.path.exists(os.path.join(data_path,self.datapath, self.filename)):
         download_url(self.url, self.datapath, messages=True)
         if not os.path.exists(os.path.join(data_path, self.datapath, self.filename)):
             return False
     
     data = np.loadtxt(os.path.join(data_path, self.datapath, self.filename),skiprows=1,delimiter=';')
     self.data = data
     data_train = data[:1000,:-1]
     label_train = data[:1000, -1:]
     self.train = (data_train, label_train)
     data_test = data[1000:,:-1]
     label_test = data[1000:,-1:]
     self.test = (data_test, label_test)
     return True
Esempio n. 2
0
File: tasks.py Progetto: Imdrail/GPy
 def load_data(self):
     from GPy.util.datasets import download_url, data_path
     if not os.path.exists(os.path.join(data_path,self.datapath, self.filename)):
         download_url(Housing.url, self.datapath, messages=True)
         if not os.path.exists(os.path.join(data_path, self.datapath, self.filename)):
             return False
     
     data = np.loadtxt(os.path.join(data_path, self.datapath, self.filename))
     self.data = data
     data_train = data[:250,:-1]
     label_train = data[:250, -1:]
     self.train = (data_train, label_train)
     data_test = data[250:,:-1]
     label_test = data[250:,-1:]
     self.test = (data_test, label_test)
     return True
Esempio n. 3
0
    def load_data(self):
        from GPy.util.datasets import download_url, data_path
        if not os.path.exists(
                os.path.join(data_path, self.datapath, self.filename)):
            download_url(Housing.url, self.datapath, messages=True)
            if not os.path.exists(
                    os.path.join(data_path, self.datapath, self.filename)):
                return False

        data = np.loadtxt(os.path.join(data_path, self.datapath,
                                       self.filename))
        self.data = data
        data_train = data[:250, :-1]
        label_train = data[:250, -1:]
        self.train = (data_train, label_train)
        data_test = data[250:, :-1]
        label_test = data[250:, -1:]
        self.test = (data_test, label_test)
        return True
Esempio n. 4
0
    def load_data(self):
        from GPy.util.datasets import download_url, data_path
        if not os.path.exists(
                os.path.join(data_path, self.datapath, self.filename)):
            download_url(self.url, self.datapath, messages=True)
            if not os.path.exists(
                    os.path.join(data_path, self.datapath, self.filename)):
                return False

        data = np.loadtxt(os.path.join(data_path, self.datapath,
                                       self.filename),
                          skiprows=1,
                          delimiter=';')
        self.data = data
        data_train = data[:1000, :-1]
        label_train = data[:1000, -1:]
        self.train = (data_train, label_train)
        data_test = data[1000:, :-1]
        label_test = data[1000:, -1:]
        self.test = (data_test, label_test)
        return True