3778 / icd-prediction-mimic Goto Github PK
View Code? Open in Web Editor NEWPredicting ICD Codes from Clinical Notes
Home Page: https://arxiv.org/abs/2008.01515
License: Apache License 2.0
Predicting ICD Codes from Clinical Notes
Home Page: https://arxiv.org/abs/2008.01515
License: Apache License 2.0
self.embedding_matrix = np.concatenate((self.embedding_matrix, np.zeros((2,W2V_SIZE))), axis=0)
File "<array_function internals>", line 6, in concatenate
ValueError: all the input array dimensions for the concatenation axis must match exactly, but along dimension 1, the array at index 0 has size 100 and the array at index 1 has size 300
@dsevero @arthurreys
I get TypeError: 'Series' objects are mutable, thus they cannot be hashed
when running MIMIC_train_w2v.py
Attaching the traceback
Traceback (most recent call last):
File "MIMIC_train_w2v.py", line 56, in <module>
main(args)
File "MIMIC_train_w2v.py", line 26, in main
mimic.split()
File "C:\Users\kiran\Music\icd-prediction-mimic-master\datasets.py", line 83, in split
self.all_icds_train = utils.make_icds_histogram(self.df.query("HADM_ID.isin(@hadm_ids[0])")).index.tolist()
File "C:\Users\kiran\Anaconda3\lib\site-packages\pandas\core\frame.py", line 3184, in query
res = self.eval(expr, **kwargs)
File "C:\Users\kiran\Anaconda3\lib\site-packages\pandas\core\frame.py", line 3300, in eval
return _eval(expr, inplace=inplace, **kwargs)
File "C:\Users\kiran\Anaconda3\lib\site-packages\pandas\core\computation\eval.py", line 327, in eval
ret = eng_inst.evaluate()
File "C:\Users\kiran\Anaconda3\lib\site-packages\pandas\core\computation\engines.py", line 70, in evaluate
res = self._evaluate()
File "C:\Users\kiran\Anaconda3\lib\site-packages\pandas\core\computation\engines.py", line 118, in _evaluate
_check_ne_builtin_clash(self.expr)
File "C:\Users\kiran\Anaconda3\lib\site-packages\pandas\core\computation\engines.py", line 27, in _check_ne_builtin_clash
names = expr.names
File "C:\Users\kiran\Anaconda3\lib\site-packages\pandas\core\computation\expr.py", line 850, in names
return frozenset([self.terms.name])
File "C:\Users\kiran\Anaconda3\lib\site-packages\pandas\core\generic.py", line 1886, in __hash__
" hashed".format(self.__class__.__name__)
TypeError: 'Series' objects are mutable, thus they cannot be hashed
When trying to run the MIMIC_train_w2v.py script, I am receiving the RuntimeError listed at the top. One change I made into the code was changing "size" to "vector_size" on line 75 in the feature_extraction.py do to an error of it not recognizing the "size" argument. Unsure if those are related. Full traceback of the error is below:
Edit: Looks like size has been updated to vector_size. So, that is just a simple fix. However, I have not found a solution for the vocab not being built.
Traceback (most recent call last): File "C:\Users\paige\Desktop\690 Project\icd-prediction-mimic-master\icd-prediction-mimic-master\MIMIC_train_w2v.py", line 56, in <module> main(args) File "C:\Users\paige\Desktop\690 Project\icd-prediction-mimic-master\icd-prediction-mimic-master\MIMIC_train_w2v.py", line 32, in main w2v.fit(mimic) File "C:\Users\paige\Desktop\690 Project\icd-prediction-mimic-master\icd-prediction-mimic-master\feature_extraction.py", line 111, in fit epochs=self.model_w2v.epochs) File "C:\Python37\lib\site-packages\gensim\models\word2vec.py", line 1034, in train self._check_training_sanity(epochs=epochs, total_examples=total_examples, total_words=total_words) File "C:\Python37\lib\site-packages\gensim\models\word2vec.py", line 1524, in _check_training_sanity raise RuntimeError("you must first build vocabulary before training the model") RuntimeError: you must first build vocabulary before training the model
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.