Git Product home page Git Product logo

pyeda's Introduction

pyEDA

This is pyEDA v.2.0.
This package includes all you need for Electrodermal Activity analysis also known as GSR. It contains preprocessing of the EDA signal and its feature extraction. Features are extracted using statistical and automatic methods.
Convolutional autoencoder is used to extract the automatic featues.

Data Collection

All the plots and the data collected for this package are collected from Shimmer GSR+ wearable sensor with 128 Hz frequency sampling rate.

How to use?

After cloning the repository to your local directory use the following command to import the library in your code:

from pyEDA.main import *

Extract Statistical Features

Use the following command in your code to analysis the data:

m, wd, eda_clean = process_statistical(eda, use_scipy=True, sample_rate=128, new_sample_rate=40, segment_width=600, segment_overlap=0)

inputs::
eda: the GSR signal
use_scipy: set true to use scipy for peak extraction from phasic gsr (recommended)
sample_rate: sample rate which the data is collected at
new_sample_rate: new sample rate to downsample the data to
segment_width: segmentation of signal in seconds
segment_overlap: overlap of segments in seconds

returns::
m: all the measurements of the signals for each of the segment indices (number of peaks, mean of EDA, maximum value of the peaks)
wd: filtered phasic gsr, phasic gsr, tonic gsr, and peacklist for each of the segment indices
eda_clean: preprocessed gsr data

Extract Automatic Features

Use the following command in your code to train the autoencoder:

prepare_automatic(eda_signals, sample_rate=128, new_sample_rate=40, k=32, epochs=100, batch_size=10)

inputs::
eda_signals: All eda signals (must be normalized to 0-1 range since the activation function of last layer is sigmoid.) targeted for feature extraction (2d list: nxm, n=number of signals, m=length of each signal)
sample_rate: sample rate which the data is collected at
new_sample_rate: new sample rate to downsample the data to
epochs: the number of epochs to train the autoencoder
k: the number of automatic features to extract
batch_size: the batch size to train the autoencoder

After the autoencoder is trained and saved, use the following command in your code to extract the automatic features:

automatic_features = process_automatic(eda)

inputs::
eda: the GSR signal
returns::
automatic_features: extracted automatic features

Documentation

Here you can find the link to different notebooks about all the aspects of analysis of the GSR signal. These documentations include information about preprocessing and feature extraction of EDA signal.

These show how to handle various analysis tasks with pyEDA, from a random generated GSR data.

Here you can find the list of notebooks for feature extraction of EDA signal:

Citation

pyEDA: An Open-Source Python Toolkit for Pre-processing and Feature Extraction of Electrodermal Activity
Full bibtex reference:

@article{aqajari2021pyeda,
  title={pyEDA: An Open-Source Python Toolkit for Pre-processing and Feature Extraction of Electrodermal Activity},
  author={Aqajari, Seyed Amir Hossein and Naeini, Emad Kasaeyan and Mehrabadi, Milad Asgari and Labbaf, Sina and Dutt, Nikil and Rahmani, Amir M},
  journal={Procedia Computer Science},
  volume={184},
  pages={99--106},
  year={2021},
  publisher={Elsevier}
}

pyeda's People

Contributors

amiraj95 avatar emadkn avatar

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.