R Package: BCIFeatR

Milestone:

BCIFeatR cover

Package: BCIFeatR
Title: Feature Extraction Toolkit for Brain-Computer Interfaces
Language: R
License: MIT

Overview

BCIFeatR is the feature-extraction layer of my EEG/BCI software toolkit. It provides a unified train/test interface for offline BCI decoding experiments: feature-specific state is fit once on training trials and then reused unchanged on held-out trials. This design keeps feature extraction deterministic and reduces train-test leakage in cross-session experiments.

Toolkit Role

In the broader workflow, BCIFeatR converts raw multi-channel EEG trials into feature matrices that can be passed to classifiers, domain-adaptation methods, or benchmark runners.

Raw EEG trials -> BCIFeatR features -> classifier / DA / benchmark

Main Capabilities

  • Spatial-filter features: CSP, FBCSP, and FBCSSP.
  • Covariance and geometry features: tangent-space projections, Riemannian utilities, ACM-based tangent features, geodesic filtering, and FGDA.
  • Spectral and temporal features: log-variance, bandpower, Hjorth parameters, MVAR, and MSVAR.
  • Avalanche features: Avalanche Transition Matrix routines.
  • Supporting tools: shrinkage covariance estimation, feature selection, SimAM attention, MCCA feature fusion, and lightweight baseline classifiers.

Example Use

library(BCIFeatR)

fit <- feat_ex_train(
  x_train,
  y_train,
  feature = "CSP",
  params = list(ncomps = 4L)
)

X_train <- fit$features
X_test  <- feat_ex_test(x_test, fit$object, feature = "CSP")

View on GitHub