Skip to content

Commit

Permalink
update covtype data file (#482)
Browse files Browse the repository at this point in the history
  • Loading branch information
fehiepsi authored Dec 3, 2019
1 parent d848e80 commit e1a6fa1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions numpyro/examples/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@


COVTYPE = dset('covtype', [
'https://d2hg8soec8ck9v.cloudfront.net/datasets/covtype.data.gz',
'https://d2hg8soec8ck9v.cloudfront.net/datasets/covtype.zip',
])


Expand Down Expand Up @@ -83,11 +83,11 @@ def train_test_split(file):
def _load_covtype():
_download(COVTYPE)

file_path = os.path.join(DATA_DIR, 'covtype.data.gz')
data = np.genfromtxt(gzip.GzipFile(file_path), delimiter=',')
file_path = os.path.join(DATA_DIR, 'covtype.zip')
data = np.load(file_path)

return {
'train': (data[:, :-1], data[:, -1].astype(np.int32))
'train': (data['data'], data['target'])
}


Expand Down

0 comments on commit e1a6fa1

Please sign in to comment.