当前位置:   article > 正文

DEAP dataset数据集 SEED dataset数据集_deap数据集下载

deap数据集下载

数据集:一个是公开数据集,一个自己做实验

自己做实验,一方面设备昂贵不够准确,另一方面公信力不够,更多用公开数据

deap数据集申请时间长难度大,就网站有偿找了一份,用代码跑了一遍。

DEAP 数据集

数据集与相关的代码 链接

资料

data_preprocessed_python

提取处理函数

  1. def save_all_labels_into_file():
  2. x = pickle.load(open('D:\eng\data_preprocessed_python\s01.dat', 'rb'), encoding='latin1') # dict
  3. labels = x['labels']
  4. valence_and_arousal = (labels[:, [0, 1]] - 5) / 4
  5. labelswithanglesandemotions = append_angle_and_emotion(valence_and_arousal)
  6. for i in range(2, 33):
  7. x = pickle.load(
  8. open('D:\eng\data_preprocessed_python\s' + str(i).zfill(2) + '.dat', 'rb'), encoding='latin1') # dict
  9. labels = x['labels'] # numpy.ndarray
  10. # valence,arousal,dominance,liking
  11. valence_and_arousal = (labels[:, [0, 1]] - 5) / 4
  12. labelswithanglesandemotions = numpy.concatenate(
  13. (labelswithanglesandemotions, append_angle_and_emotion(valence_and_arousal)), 0)
  14. with open('D:\eng\data_preprocessed_python\labels.txt', 'wb') as outfile:
  15. numpy.savetxt(outfile, labelswithanglesandemotions, "%.2f")

SEED数据集

资料

数据提取代码

  1. from utils.tools import build_preprocessed_eeg_dataset_CNN, RawEEGDataset, subject_independent_data_split
  2. import torch
  3. import torch.nn as nn
  4. from torch.utils.data import DataLoader
  5. from torch.utils.tensorboard import SummaryWriter
  6. # 加载数据,整理成所需要的格式
  7. folder_path = '../data/Preprocessed_EEG/'
  8. feature_vector_dict, label_dict = build_preprocessed_eeg_dataset_CNN(folder_path)
  9. train_feature, train_label, test_feature, test_label = subject_independent_data_split(feature_vector_dict, label_dict,
  10. {'2', '6', '9'})
  11. desire_shape = [1, 62, 200]
  12. train_data = RawEEGDataset(train_feature, train_label, desire_shape)
  13. test_data = RawEEGDataset(test_feature, test_label, desire_shape)

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/花生_TL007/article/detail/72876
推荐阅读
  

闽ICP备14008679号