Coder Social home page Coder Social logo

arrhythmia-cnn's People

Contributors

bareini avatar tom-beer avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

arrhythmia-cnn's Issues

does hea file contain the ecg data?

Hi tom,I find that you save fragment of hea file as data. But I plot it and find that the wave of hea file looks a little different with wave plotted by physioBank ATM. Is it ok or are they the same thing?

Changing the value of desired_segment_len gives error in creating target value

First of all thanks for doing nice work on slicing MIT-BIH data

I wanted to test the code with the 30s and 60s slices of ecg. I am able to create slices and get aux labels.

But it gives me error. That is obvious because I have different value in df.

target:N, num: 283
 len df: 326
target:L, num: 103
 len df: 56
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
/var/folders/sc/2rv_t51115d2c6tn41s_7phc0000gq/T/ipykernel_14390/3835309512.py in <module>
     78 for cls, num in num_labels_we_have.items():
     79     print(f'target:{cls}, num: {num}')
---> 80     idx, sample_df_target, signals_target = sample_per_sym(seg_df, cls, num)
     81     sample_df.append(sample_df_target)
     82     signals.append(signals_target)

/var/folders/sc/2rv_t51115d2c6tn41s_7phc0000gq/T/ipykernel_14390/3835309512.py in sample_per_sym(seg_df, cls, num)
     65     # sample
     66     print(f' len df: {len(target_df)}')
---> 67     sample_df = target_df.sample(n=num)
     68 
     69     # add the index at the begining of the signal

~/Documents/avidhrt_ml_venv/lib/python3.7/site-packages/pandas/core/generic.py in sample(self, n, frac, replace, weights, random_state, axis)
   4863                              "provide positive value.")
   4864 
-> 4865         locs = rs.choice(axis_length, size=n, replace=replace, p=weights)
   4866         return self.take(locs, axis=axis, is_copy=False)
   4867 

mtrand.pyx in numpy.random.mtrand.RandomState.choice()

ValueError: Cannot take a larger sample than population when 'replace=False'

If I understand how you decided num_labels_dict value I can fix it for 30/60s strips. I checked your research paper and codes but did not get any clue.

Really appreciate your reply.

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.