Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define the dead and alive patient cohorts for medGAN #2

Open
yy6linda opened this issue Mar 26, 2020 · 3 comments
Open

Define the dead and alive patient cohorts for medGAN #2

yy6linda opened this issue Mar 26, 2020 · 3 comments

Comments

@yy6linda
Copy link
Owner

create two feature sets for the dead and alive patient cohorts

@yy6linda
Copy link
Owner Author

yy6linda commented Mar 28, 2020

I used ivan's model which generated a sparse matrix with 42549 features, I used todense methods for feeding the model into the medgan
Here I didn't use the full alive set, all the death set is kept and alive set is randomly selected based on death: alive = 1:5
Death: (8309,42549)
Alive (613577,42549)
when training death.npy, due to the small size of death.npy, use replace = True

 File "train.py", line 96, in <module>
    saveMaxKeep=args.save_max_keep)
  File "/data/users/yanyao/myproj/synpuf/omop/app/1000-1000-death-SynthEHR/model.py", line 391, in train
    batchIdx = np.random.choice(idx, size=batchSize, replace=False)
  File "mtrand.pyx", line 948, in numpy.random.mtrand.RandomState.choice
ValueError: Cannot take a larger sample than population when 'replace=False'
"nohup.out" 3065L, 5097612C    

@yy6linda
Copy link
Owner Author

yy6linda commented Mar 28, 2020

nohup python train.py --data_file './death.npy' --n_pretrain_epoch 1000 --n_epoch 1000&

synthetic death.npy
/data/users/yanyao/myproj/synpuf/omop/app/1000-1000-death-SynthEHR
synthetic alive.npy
/data/users/yanyao/myproj/synpuf/omop/app/1000-1000-alive-SynthEHR

@yy6linda
Copy link
Owner Author

yy6linda commented Mar 30, 2020

only use condition:
(8309, 28664)
(41545, 28664)
Inside 28664, is 28539 condition_source_value, 116 year of birth, 3 gender concept_id , 6 race_concept_id

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant