Coder Social home page Coder Social logo

Comments (2)

quzhouxiachuan avatar quzhouxiachuan commented on July 25, 2024

Hi
I solved the problem by change
pds = EcgDataset(path=os.path.join(PATH_TO_DATA, "*.hea"), no_ext=True, sort=True)
to
import cardio.dataset as ds
index = ds.FilesIndex(path="../cardio/tests/data/*.hea", no_ext=True, sort=True)
from cardio import EcgBatch
pds = ds.Dataset(index, batch_class=EcgBatch)

I am wondering what is causing this?

Thanks!

from cardio.

dpodvyaznikov avatar dpodvyaznikov commented on July 25, 2024

Hi!

Currently cardio/tests/data/ directory contains different ECG's to run tests. There are two types of signals in wfdb format: Axxxxx files from PhysioNet Challenge 2017 Database and one signal sel100 from QT Database.
For AF detection you should use data from PhysioNet Challenge 2017. As it is mentioned in the tutorial, we recommend you to download the database from here or use signals from cardio/test/data/ with mask A*.hea.

Changing

pds = EcgDataset(path=os.path.join(PATH_TO_DATA, "*.hea"), no_ext=True, sort=True)

to

import cardio.dataset as ds
index = ds.FilesIndex(path="../cardio/tests/data/*.hea", no_ext=True, sort=True)
from cardio import EcgBatch
pds = ds.Dataset(index, batch_class=EcgBatch)

should not make any difference.
It seems that the code above worked by accident: you performed splitting with shuffle
pds.cv_split(0.8, shuffle=True)
and index sel100, which caused the problem, happened to be in pds.test, thus allowing you to run training without any errors.

from cardio.

Related Issues (20)

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.