Giter Site home page Giter Site logo

cheulyop / pyteap Goto Github PK

View Code? Open in Web Editor NEW
14.0 2.0 3.0 43 KB

PyTEAP: A Python implementation of Toolbox for Emotion Analysis using Physiological signals (TEAP).

License: GNU General Public License v3.0

Python 100.00%
deap physiological-signals baseline-classification

pyteap's Introduction

PyTEAP

License: GPL v3 PyPI

PyTEAP is a Python implementation of Toolbox for Emotion Analysis using Physiological signals (TEAP).

This package intends to reimplement TEAP, originally written in MATLAB, in Python, to enable interoperation with other Python packages.


Installation

To use PyTEAP, you can either clone this repository:

$ git clone https://github.com/cheulyop/PyTEAP.git
$ cd PyTEAP

or install it via pip:

$ pip install PyTEAP

Baseline classification on DEAP

As the primary goal of this package is to provide a toolbox for processing physiological signals for emotion analysis, this package includes a script to perform simple baseline classification on DEAP dataset.

There are two ways you can do baseline classification on DEAP with PyTEAP:

  1. Clone this repository and run the script for baseline classification.
$ python baseline.py --root '/path/to/deap_root'

Running baseline.py will load raw datafiles from the root directory, preprocess features and target labels, perform baseline classification with four simple classifiers: 1) Gaussian Naive Bayes, 2) random voting assuming a uniform distribution between classes, 3) majority voting, 4) class ratio voting, and finally print a table showing performance of each classifier, measured with accuracy score, balanced accuracy score, and F1-score.

  1. Or, install PyTEAP via pip as shown above, and use its modules and functions as you want.

The below table shows the results of baseline classification with seed=0.

Gaussian NB Random voting Majority voting Class ratio voting
Acc. 0.508594 0.496094 0.553125 0.489063
Balanced acc. 0.513142 0.494228 0.500000 0.484621
F1-score 0.513712 0.528224 0.712272 0.531533

* You must have access to DEAP dataset, in particular a preprocessed data in Python format to perform above baseline classification. Please contact DEAP maintainers if you need access to the dataset.

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.