Coder Social home page Coder Social logo

unfold.jl's Introduction

Unfold.jl

Beta Toolbox to perform linear regression on biological signals.

This tool combines mass-univariate linear (mixed) models with overlap correction.

This kind of overlap correction is also known as encoding modeling, linear deconvolution, Temporal Response Functions (TRFs) and probably under other names. fMRI models with HRF-basis functions are also supported.

Relation to Unfold (matlab)

The matlab toolbox is recommended for research work. It is richer in features, better documented and tested.

The julia toolbox is a type of research-playground, but offers LinearMixedModel support.

Feature Unfold unmixed Unfold.jl
overlap correction x x x
non-linear splines x x x
plotting tools x
sanity checks x
tutorials x
speed x x
unittests x x
HRF (fMRI) basis x
mix different basisfunctions x
different timewindows per event x
mixed models x x
item & subject effects x x

Install

using Pkg;
Pkg.add(url = "https://github.com/unfoldtoolbox/Unfold.jl")

For some of the testing functionality in the test/ path, you will also need

 Pkg.add("Makie") # use CairoMakie if in a headless environment
 Pkg.add("StatsMakie")
 Pkg.add("MAT")
 Pkg.add("HDF5")

Usage

For a quickstart:

f = @formula 0~1+condA
events::DataFrame
data::Array{Float64,2}
epochs::Array{Float64,3} # channel x time x epochs (n-epochs == nrows(events))
times = range(0,length=size(epochs,3),step=1/sampling_rate)

basisfunction::Unfold.BasisFunction
basis = firbasis(ฯ„=(-0.3,0.5),srate=250)
  1. Timeexpansion No, Mixed No : fit(UnfoldLinearModel,formula,events,epochs,times)
  2. Timeexpansion No, Mixed Yes : fit(UnfoldLinearMixedModel,formula,events,epochs,times)
  3. Timeexpansion Yes, Mixed No : fit(UnfoldLinearModel,Dict("eventname"=>(formula,basisfunction)),events,data)
  4. Timeexpansion Yes, Mixed Yes: fit(UnfoldLinearMixedModel,Dict("eventname"=>(formula,basisfunction),"event2"=>(formula2,basis2)),events,data)

Documentation

Most functions have documentation, e.g. ?Unfold.fit

Tutorials see doc/lmm_tutorial.html & doc/lm_tutorial.html - more to come. Contributions very welcome!

Contributors (alphabetically)

  • Phillip Alday
  • Benedikt Ehinger
  • Dave Kleinschmidt

Acknowledgements

This work was supported by the Center for Interdisciplinary Research, Bielefeld (ZiF) Cooperation Group "Statistical models for psychological and linguistic data".

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.