You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Why is the error occurring?
keys_imi=[]
keys_hc=[]
data={}
segments_hc=0
segments_imi=0
for i,key in enumerate(filepaths):
_,fields=wfdb.srdsamp(key)
if 'Healthy control' in fields['comments'][4]:
segments,label_bin=get_segments(key,[1,2,5])
data[key]=(segments,label_bin)
segments_hc=segments_hc+segments.shape[0]
keys_hc.append(key)
else:
if 'Myocardial infarction' in fields['comments'][4]:
if 'inferior' in fields['comments'][5]:
segments,label_bin=get_segments(key,[1,2,5])
data[key]=(segments,label_bin)
segments_imi=segments_imi+segments.shape[0]
keys_imi.append(key)
print('processed {}/{}'.format(i+1,len(filepaths),),end='\r')
print('\n')
patients_imi=set([key.split(os.path.sep)[-2] for key in keys_imi])
patients_hc=set([key.split(os.path.sep)[-2] for key in keys_hc])
len(patients_imi),len(patients_hc)
AttributeError: module 'wfdb' has no attribute 'srdsamp'
The text was updated successfully, but these errors were encountered:
Why is the error occurring?
keys_imi=[]
keys_hc=[]
data={}
segments_hc=0
segments_imi=0
for i,key in enumerate(filepaths):
_,fields=wfdb.srdsamp(key)
if 'Healthy control' in fields['comments'][4]:
segments,label_bin=get_segments(key,[1,2,5])
data[key]=(segments,label_bin)
segments_hc=segments_hc+segments.shape[0]
keys_hc.append(key)
else:
if 'Myocardial infarction' in fields['comments'][4]:
if 'inferior' in fields['comments'][5]:
segments,label_bin=get_segments(key,[1,2,5])
data[key]=(segments,label_bin)
segments_imi=segments_imi+segments.shape[0]
keys_imi.append(key)
print('processed {}/{}'.format(i+1,len(filepaths),),end='\r')
print('\n')
patients_imi=set([key.split(os.path.sep)[-2] for key in keys_imi])
patients_hc=set([key.split(os.path.sep)[-2] for key in keys_hc])
len(patients_imi),len(patients_hc)
AttributeError: module 'wfdb' has no attribute 'srdsamp'
The text was updated successfully, but these errors were encountered: