mp2893 / rnn_predict Goto Github PK
View Code? Open in Web Editor NEWSimple RNN (Gated Recurrent Units) for predicting a diagnosis
Simple RNN (Gated Recurrent Units) for predicting a diagnosis
Hi
I run the example code as follows, and it gives me some errors, could i ask hot to fix it? thanks.
python gru_onehot.py sequences.pkl labels.pkl outfile
Loading data ... done!!
Building the model ... done!!
Constructing the optimizer ... done!!
Optimization start !!
Traceback (most recent call last):
File "gru_onehot.py", line 268, in
train_GRU_RNN(dataFile=dataFile, labelFile=labelFile, outFile=outFile, inputDimSize=inputDimSize, hiddenDimSize=hiddenDimSize, max_epochs=max_epochs, L2_reg=L2_reg, batchSize=batchSize, use_dropout=use_dropout)
File "gru_onehot.py", line 245, in train_GRU_RNN
validAuc = calculate_auc(test_model, validSet)
File "gru_onehot.py", line 182, in calculate_auc
auc = roc_auc_score(list(labels), list(scoreVec))
File "/usr/local/lib/python2.7/dist-packages/sklearn/metrics/ranking.py", line 260, in roc_auc_score
sample_weight=sample_weight)
File "/usr/local/lib/python2.7/dist-packages/sklearn/metrics/base.py", line 75, in _average_binary_score
return binary_metric(y_true, y_score, sample_weight=sample_weight)
File "/usr/local/lib/python2.7/dist-packages/sklearn/metrics/ranking.py", line 251, in _binary_roc_auc_score
raise ValueError("Only one class present in y_true. ROC AUC score "
ValueError: Only one class present in y_true. ROC AUC score is not defined in that case.
When I execute gru_onehot.py, I get a below error.
File "gru_onehot.py", line 211
print 'Loading data ... ',
^
SyntaxError: Missing parentheses in call to 'print'
Hello Ed,
Our team is working on EMR/EHR data and then applying Machine learning to build models to classify/predict for a specific use cases.
We have gone through your various works such as MedGAN, Medical concept vector using skip-gram and Med2Vec and are really interested in leveraging the same in our experiments.
There are two challenges that we face -
We understand that Med2Vec is a better approach than MCV(Skip-gram) as Med2Vec captures the temporality by capturing visit-level representation.
We wanted to understand more on the Medical concept vector , how we can generate medical concept vectors for any EHR data.
Is MCV with skipgram code is already available on github?As we understand that you are using emb.pkl pickle files in your python code .
Thanks,
Ankit
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.