Content uploaded by Giulio Gabrieli
Author content
All content in this area was uploaded by Giulio Gabrieli on Jun 17, 2018
Content may be subject to copyright.
PySiology
A python package for
physiological feature
extraction
Gabrieli G., Azhari A., Esposito G.
WIRN 2018
2
Feature estimation
Classification
Raw signal
GUI
Feature estimation is
done using a GUI. Easier
for non-experts.
Low customizability
Hidden parameters
CL / Scripting
Feature estimation is
done by (hard)-coding
your own set of functions
and classes.
(ex: MNE-python)
Errors
Time-consuming
3
Suitable for novice and expert users
Low learning curve
Highly customizable
Up-to-date with latest techniques
4
PySiology
Features estimation from ECG, EMG
and EDA raw signals
pysiology.rtfd.io
git.io/vh0PB
5
Python
Division by signals and not by stage of analysis
Scripting vs OOP
Clear documentation
Tutorials and sample data
Dummy pipelines for preprocessing and analysis
Open source package
6
7
Features in v. 0.0.9
ECG IBI, BPM,SDNN, SDSD, RMSSD, PNN50, PNN20, PNN50 / PNN20,
frequency analysis (high, low, very low)
EDA Rise time, latency, amplitude, half amplitude, EDA at apex, decay
time, SCR width
EMG
IEMG, MAV, SSI, VAR, TM, LOG, RMS, WL, AAC, DASDV, AFB, MYOP,
WAMP, SSC, MAVSLPk, HIST, MNF, MDF, peak frequency, MNP, TTP, SM,
FR, PSR, VCF
“
pysiology.signals.getFeatureNames(signal,
p1=stdalue1, …, pN=stdvalueN)
pysiology.signals.analyzeSignal(signal, sr)
8
“
import pysiology
ECG = pysiology.sampledata.loadsampleECG() #load the sample ECG Signal
sr = 1000 #samplerate in hZ
events = [["A",10], ["B",20]] #we can define the events the way we prefer
eventLenght = 8 #in seconds
for event in events:
startS, endS = [sr * event[1],startSample + (sr * eventLenght)
results = pysiology.electrocardiography.analyzeECG(ECG[startS:endS],sr)
9
Advanced
Example
Estimating images’ valence
through physiological
measurements
58 university students (age = 21.5+2,3)
50 IAPS images (25 low val., 25 high val.)
Images were presented for 8s (6s interval)
Physiological measurements:
ECG
EDA
EMG (Corrugator supercilii)
11
12
!
13
"#
Preprocessing (using PySiology, standard parameters)
Feature estimation (using PySiology, standard
parameters)
Principal component analysis (using Scikit-learn, 6
components)
Classification using MLPNN (using Scikit-learn,
standard parameters)
Classification using Decision Tree (using Scikit-learn,
standard parameters)
Bootstrapping:
◉test = 100 repetition
◉train = 45 images (10% of the dataset)
14
$
%
&'' 65%
$( 66%
15
Conclusions
PySiology is an open source python package for
physiological features estimation.
Suitable for novice users
Highly customizable
Tutorials and documentation
Reliable method for physiological features estimation
16
$%)
%
&'' 97%
18
N = 1361 epochs, bootstrapping with 100 repetition, 90% Train
Reference vs estimated valence
Reference valence
Estimated valence