Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
chl8856 committed Jun 10, 2020
0 parents commit bf7b3e7
Show file tree
Hide file tree
Showing 10 changed files with 4,500 additions and 0 deletions.
396 changes: 396 additions & 0 deletions class_AC_TPC.py

Large diffs are not rendered by default.

441 changes: 441 additions & 0 deletions data/.ipynb_checkpoints/data_ADNI_preprocess-checkpoint.ipynb

Large diffs are not rendered by default.

1,661 changes: 1,661 additions & 0 deletions data/.ipynb_checkpoints/data_CF_label_test-checkpoint.ipynb

Large diffs are not rendered by default.

875 changes: 875 additions & 0 deletions data/.ipynb_checkpoints/data_CF_preprocess-checkpoint.ipynb

Large diffs are not rendered by default.

Binary file added data/sample/data.npz
Binary file not shown.
19 changes: 19 additions & 0 deletions data_loader.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import numpy as np


def import_data(data_name = 'sample'):
'''
Output:
- data_x: [N, max_length, 1+x_dim] tensor (where N: number of samples, max_length: max sequence length, x_dim: feature dimension)
the first feature is the time difference.
- data_y: [N, max_length, y_dim] tensor (where N: number of samples, max_length: max sequence length, y_dim: output dimension)
'''
if data_name == 'sample':
npz = np.load('./data/sample/data.npz')
data_x = npz['data_x']
data_y = npz['data_y']
y_type = npz['y_type'] #{'binary', 'categorical', 'continuous'}
else:
raise ValueError('error: data_name not defined')

return data_x, data_y, y_type
Loading

0 comments on commit bf7b3e7

Please sign in to comment.