v1xerunt / stagenet Goto Github PK
View Code? Open in Web Editor NEWSource code for StageNet: Stage-Aware Neural Networks for Health Risk Prediction
Source code for StageNet: Stage-Aware Neural Networks for Health Risk Prediction
Hey, I recently want to train the model, after i prepared the data and copy it to the data
folder, i meet some problems.
When i run:
python train.py --data_path=data --file_name='trained_model
I got the output like that:
E:\StageNet\ai\StageNet>python train.py --data_path=data --file_name='trained_model
train.py:4: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
import imp
Preparing training data ...
Constructing model ...
available device: cuda:0
Start training ...
Chunk 0, Batch 0: Loss = 0.6755
==>Predicting on validation
Valid loss = 0.5794
confusion matrix:
[[66]]
Traceback (most recent call last):
File "train.py", line 280, in <module>
ret = metrics.print_metrics_binary(valid_true, valid_pred)
File "E:\StageNet\ai\StageNet\utils\metrics.py", line 21, in print_metrics_binary
acc = (cf[0][0] + cf[1][1]) / np.sum(cf)
IndexError: index 1 is out of bounds for axis 0 with size 1
I wonder if it's because I'm using the wrong version of the library, I would like to ask whether requirements.txt can be provided
Hello, after reading the StageNet model, I am very interested. So, if I want to use it for modeling the sequence of access data composed of 11 variables with unequal intervals. May I ask which parts of the model you mentioned to change?
I'm looking forward to your answer, thanks.
Hi!
What is the purpose of "decomp_normalizer"? Is the provided file a standard for the complete dataset?
Also, the jupyter notebook contains a reference to "demographic" folder. The data generated using "https://github.com/YerevaNN/mimic3-benchmarks" does not generate any demographic folder and I am not sure which csv files are being referred for this case. Can you please explain?
Tabinda
Hi,
I used the benchmark tools to complete data set partitioning of MIMIC-iii. However, There is no validation set in it. And the csv file in your ./data dictionary is just for seveal examples. Can you release the complete patitioning csv file?
Thanks,
Lucas
It seems like you preprocess the time difference into the regular interval (e.g. an hour), but how to deal with the time interval if we deal with the clinical records in each visit?
Thanks.
Hi,
I tried to reproduce the experimentation result on MIMIC3 dataset from the paper. However, I think there might be something wrong probably in the setting.
I got the results as the last 2 rows. The 3rd row "StageNET (Author's Saved Weights)" is pretty close to the paper's number; however when I retrained the model by calling
"python train.py --data_path='path/to/data/' --file_name='trained_model'"
I got the result as in the last line. (The best model picked was from epoch 9.)
Can you please help on how should I retrain the model.
ย | AUPRC | AUROC | min(Re, P+) |
---|---|---|---|
LSTM | 0.280 (0.003) | 0.897 (0.002) | 0.324 (0.003) |
StageNET (Paper's Result) | 0.323 (0.002) | 0.903 (0.002) | 0.372 (0.003) |
StageNET (Author's Saved Weights) | 0.337471534 | 0.902723791 | 0.372237646 |
StageNET (Trained Model) | 0.288944411 | 0.890060419 | 0.339553482 |
Thanks,
Thiti
Great job. Can this code be applied to the ESDR data set, and where can I find this ESDR dataset? And, can you provide some test samples, and annotate the data flow in your code in detail.
Hi there,
I find your paper quite interesting and it's great that you open sourced the code.
I'm trying to follow your code and reproducing the experiment results using the MIMIC-III dataset.
I notice that in the train.py:
batch_time = torch.ones((batch_x.size(0), batch_x.size(1)), dtype=torch.float32).to(device)
is used as input for the time interval between different visits, which is in contrast with what claimed in the paper.
Could you explain what is going on here? Is there something that I'm misunderstanding?
Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.