Skip to main content

A package for BCI-related tasks, including dataset loading, preprocessing, feature extraction, and classification.

Project description

BCI Flow

Bciflow is a Python package focused on Brain-Computer Interface (BCI)-related work. It provides tools for loading pre-established datasets, performing analysis, pre-processing, filtering, feature extraction, and classification, covering the entire process of creating BCI models. Installation

You can install bciflow directly from PyPI using pip:

pip install bciflow 

Features

  • Dataset Loading: Support for popular BCI datasets, such as BCI Competition datasets, OpenBMI, among others.
  • Pre-processing: Filtering, artifact removal, normalization, and other data preparation techniques.
  • Feature Extraction: Methods for extracting relevant features from EEG signals, such as frequency bands, CSP (Common Spatial Patterns), etc.
  • Classification: Implementation of classification algorithms such as SVM, LDA, Neural Networks, among others.
  • Complete Pipeline: Facilitates the creation of complete pipelines for processing and analyzing BCI data.

Loading a Dataset

The datasets must be loaded by the user, and the data path must be provided by the user in the path parameter. For example, to load the CBCIC dataset:

from bciflow.datasets import cbcic
# Load CBCIC dataset
data = cbcic(
    subject=1,  # Subject number
    session_list=None,  # List of sessions to load (default: all sessions)
    labels=['left-hand', 'right-hand'],  # Labels to include
    path='data/cbcic/'  # Path to the dataset files
)

Implemented Methods

Method Category Implemented
Temporal Filtering
Bandpass Filtering Temporal Filtering Yes
Chebyshev II Filter Pre-processing Yes
Signal Convolution Pre-processing Yes
Empirical Mode Decomposition (EMD) Temporal Filtering Yes
Filter Bank (ChebyshevII) Temporal Filtering Yes
Filter Bank (Convolution) Temporal Filtering Yes
Cubic Resampling Temporal Filtering No
FFT-based Resampling Temporal Filtering No
Wavelet Temporal Filtering Yes
Short-Time Fourier Transform (STFT) Temporal Filtering No
Spatial Filtering
Common Spatial Patterns (CSP) Spatial Filtering Yes
Euclidean Alignment (EA) Spatial Filtering Yes
Feature Extraction
Average Power Spectral Density (APSD) Feature Extraction Yes
Curve Length Feature Extraction Yes
Log Power Feature Extraction Yes
Nonlinear Energy Feature Extraction Yes
Welch Periodogram Feature Extraction Yes
Canonical Correlation Analysis (CCA) Feature Extraction No
Logarithmic PSD (LPSD) Feature Extraction No
Feature Selection
Mutual Information Best Individual Features (MIBIF) Feature Selection Yes
Classification
Naive Bayes Parzen Window (NBPW) Classification Yes
Data Augmentation
EMD-based Augmentation (emdaug) Data Augmentation No
Gaussian Noise (gaussiannoise) Data Augmentation No
Time-frequency Gaussian Noise (tfgaussiannoise) Data Augmentation No
Time-frequency Recombination (tfrecombination) Data Augmentation No

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bciflow-1.0.0.dev9.tar.gz (21.6 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bciflow-1.0.0.dev9-py3-none-any.whl (41.9 kB view details)

Uploaded Python 3

File details

Details for the file bciflow-1.0.0.dev9.tar.gz.

File metadata

  • Download URL: bciflow-1.0.0.dev9.tar.gz
  • Upload date:
  • Size: 21.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.2

File hashes

Hashes for bciflow-1.0.0.dev9.tar.gz
Algorithm Hash digest
SHA256 f7bace161b5f880cfc03d6aac3a9f905d902da6d6916986f032ff8a3493affe3
MD5 7df39b37442f517c49ee94e6b984b705
BLAKE2b-256 56c76062bfdaea16cc3d8243357b9799e7b2519daec97fa274490ccefe2dd54e

See more details on using hashes here.

File details

Details for the file bciflow-1.0.0.dev9-py3-none-any.whl.

File metadata

  • Download URL: bciflow-1.0.0.dev9-py3-none-any.whl
  • Upload date:
  • Size: 41.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.2

File hashes

Hashes for bciflow-1.0.0.dev9-py3-none-any.whl
Algorithm Hash digest
SHA256 468d1be8fb4199d9b6fd0b6186c5a354139aab4cd11fc38d053ee828acb96b5c
MD5 1c7a983d5c77a877cb2d331db95a6f4b
BLAKE2b-256 31f43cb9885674001c93efd627204e49c7d3d6f25f1c8c70e132f6c56ddf144e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page