https://github.com/unfoldtoolbox/unfolddecode.jl
https://github.com/unfoldtoolbox/unfolddecode.jl
decoding eeg julia overlap-correction
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/unfoldtoolbox/unfolddecode.jl
- Owner: unfoldtoolbox
- License: mit
- Created: 2023-08-11T12:13:59.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-08-20T09:42:53.000Z (6 months ago)
- Last Synced: 2025-09-05T07:08:10.864Z (5 months ago)
- Topics: decoding, eeg, julia, overlap-correction
- Language: Julia
- Homepage:
- Size: 265 MB
- Stars: 1
- Watchers: 1
- Forks: 5
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Citation: CITATION.cff
Awesome Lists containing this project
README
# [](https://github.com/unfoldtoolbox/UnfoldDecode.jl/tree/main)
[](https://unfoldtoolbox.github.io/UnfoldDecode.jl/stable)
[](https://unfoldtoolbox.github.io/UnfoldDecode.jl/dev)
[](https://github.com/unfoldtoolbox/UnfoldDecode.jl/actions)
[](https://github.com/unfoldtoolbox/UnfoldDecode.jl/actions/workflows/Test.yml?query=branch%3Amain)
[](https://github.com/unfoldtoolbox/UnfoldDecode.jl/actions/workflows/Lint.yml?query=branch%3Amain)
[](https://github.com/unfoldtoolbox/UnfoldDecode.jl/actions/workflows/Docs.yml?query=branch%3Amain)
[](https://codecov.io/gh/unfoldtoolbox/UnfoldDecode.jl)
[](https://doi.org/FIXME)
[](CODE_OF_CONDUCT.md)
[](#contributors)
|rERP|EEG visualisation|EEG Simulations|BIDS pipeline|Decode EEG data|Statistical testing|
|---|---|---|---|---|---|
|
|
|
|
|
|
|
Beta-stage toolbox to decode ERPs with overlap, e.g. from eye-tracking experiments.
> [!WARNING]
> Still little unit-tests implemented as of 2025-02-28 - use at your own risk!
Currently the following algorithms are implemented:
- [back-to-back regession](https://doi.org/10.1016/j.neuroimage.2020.117028) (`solver_b2b`, [tutorial how to use](https://unfoldtoolbox.github.io/Unfold.jl/dev/HowTo/custom_solvers/#Back2Back-regression))
- overlap corrected LDA¹ proposed by [Gal Vishne, Leon Deouell et al.](https://doi.org/10.1101/2023.06.28.546397) is implemented, but more to follow.
¹ actually any MLJ supported classification/regression model is already supported
## Install
### Julia
Click to expand
The recommended way to install julia is [juliaup](https://github.com/JuliaLang/juliaup).
It allows you to, e.g., easily update Julia at a later point, but also test out alpha/beta versions etc.
TL:DR; If you dont want to read the explicit instructions, just copy the following command
#### Windows
AppStore -> JuliaUp, or `winget install julia -s msstore` in CMD
#### Mac & Linux
`curl -fsSL https://install.julialang.org | sh` in any shell
### UnfoldDecode
Not yet registered thus you have to do:
```julia
using Pkg
Pkg.add(url="https://github.com/unfoldtoolbox/UnfoldDecode.jl")
using UnfoldDecode
```
once it is registered, this will simplify to `Pkg.add("UnfoldDecode")`
## Quickstart
```julia
LDA = @load LDA pkg=MultivariateStats
des = Dict("fixation" => (@formula(0~1+condition+continuous),firbasis((-0.1,1.),100)));
uf_lda = fit(UnfoldDecodingModel,des,evt,dat,LDA(),"fixation"=>:condition)
```
Does the trick - you should probably do an Unfold.jl tutorial first though!
## Loading Data
have a look at PyMNE.jl to read the data. You need a data-matrix + DataFrames.jl event table (similar to EEGlabs EEG.events)
## Limitations
- Not thoroughly tested, no unit-tests yet!
- Missing features: e.g. No time generalization is available, but straight forward to implement with the current tooling.
## Contributions
Contributions are very welcome. These could be typos, bugreports, feature-requests, speed-optimization, new solvers, better code, better documentation.
### How-to Contribute
You are very welcome to raise issues and start pull requests!
### Adding Documentation
1. We recommend to write a Literate.jl document and place it in `docs/literate/FOLDER/FILENAME.jl` with `FOLDER` being `HowTo`, `Explanation`, `Tutorial` or `Reference` ([recommended reading on the 4 categories](https://documentation.divio.com/)).
2. Literate.jl converts the `.jl` file to a `.md` automatically and places it in `docs/src/generated/FOLDER/FILENAME.md`.
3. Edit [make.jl](https://github.com/unfoldtoolbox/Unfold.jl/blob/main/docs/make.jl) with a reference to `docs/src/generated/FOLDER/FILENAME.md`.
## How to Cite
If you use UnfoldDecode.jl in your work, please cite using the reference given in [CITATION.cff](https://github.com/unfoldtoolbox/UnfoldDecode.jl/blob/main/CITATION.cff) AND the respective algorithm.
## Acknowledgements
Funded by Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) under Germany´s Excellence Strategy – EXC 2075 – 390740016
## Contributors
This project follows the [all-contributors](https://allcontributors.org/docs/en/specification) specification.
Contributions of any kind welcome!
You can find the emoji key for the contributors [here](https://github.com/unfoldtoolbox/Unfold.jl/blob/main/docs/contrib-emoji.md).