Open xiexy-1994 opened 3 years ago
the same error :(
Sorry for the late reply. The problem is unexpected introduced in the last commit. I've reverted it, and it should work now.
Please, how can I get train.csv and test.csv. In your code you used them indirectly
@way-sal Sorry for the late reply. Do you mean how to get train_ids or test_ids? After running preprocess.py
, you'll get the labels.csv
. Each row in labels.csv
contains a patient's id and the corresponding fold (last column, value ranges 1-10). In the split_data
function inside utils.py
, the 10 folds are permuted to allow randomness. So in order to get train/val/test.csv, you just need a simple script to import split_data
from utils.py
and then match it with labels.csv
. This should be an easy work using pandas
.
执行baseline.py时出现下述问题,不知楼主可否解答一下。
环境按照readme里面的重新配置的
File "baselines.py", line 53, in
df_X = generate_features_csv(features_csv, data_dir, patient_ids)
File "baselines.py", line 35, in generate_features_csv
ecg_features.append(extract_features(ecg_data))
File "/pdpd_workspace/workspace/test/ecg-diagnosis-master/expert_features.py", line 62, in extract_features
all_features += extract_channel_features(channel)
File "/pdpd_workspace/workspace/test/ecg-diagnosis-master/expert_features.py", line 54, in extract_channel_features
return stats_features + wavelet_features + hos_features
ValueError: operands could not be broadcast together with shapes (7,) (938,)