[](https://github.com/unfoldtoolbox/UnfoldDecode.jl/tree/main)
April 26, 2025 · View on GitHub
| Estimation | Visualisation | Simulation | BIDS pipeline | Decoding | Statistics | MixedModelling |
|---|---|---|---|---|---|---|
![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
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 (
solver_b2b, tutorial how to use) - overlap corrected LDA¹ proposed by Gal Vishne, Leon Deouell et al. 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. 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:
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
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
- We recommend to write a Literate.jl document and place it in
docs/literate/FOLDER/FILENAME.jlwithFOLDERbeingHowTo,Explanation,TutorialorReference(recommended reading on the 4 categories). - Literate.jl converts the
.jlfile to a.mdautomatically and places it indocs/src/generated/FOLDER/FILENAME.md. - Edit 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 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 specification.
Contributions of any kind welcome! You can find the emoji key for the contributors here.





