Code Monkey home page Code Monkey logo

icd-prediction-mimic's People

Contributors

arthurreys avatar dsevero avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

icd-prediction-mimic's Issues

ValueError when running MIMIC_train_w2v.py file.

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

TypeError: 'Series' objects are mutable, thus they cannot be hashed

@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

Receiving a RuntimeError "you must first build vocabulary before training the model"

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.