Skip to content

Commit

Permalink
build based on a99b35a
Browse files Browse the repository at this point in the history
  • Loading branch information
Documenter.jl committed Feb 26, 2024
1 parent df1a124 commit 50d34b7
Show file tree
Hide file tree
Showing 55 changed files with 1,960 additions and 0 deletions.
1 change: 1 addition & 0 deletions previews/PR175/.documenter-siteinfo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"documenter":{"julia_version":"1.10.1","generation_timestamp":"2024-02-26T14:20:49","documenter_version":"1.2.1"}}
21 changes: 21 additions & 0 deletions previews/PR175/HowTo/custom_solvers/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Alternative Solvers (Robust, GPU, B2B) · Unfold.jl Timeseries Analysis &amp; Deconvolution</title><meta name="title" content="Alternative Solvers (Robust, GPU, B2B) · Unfold.jl Timeseries Analysis &amp; Deconvolution"/><meta property="og:title" content="Alternative Solvers (Robust, GPU, B2B) · Unfold.jl Timeseries Analysis &amp; Deconvolution"/><meta property="twitter:title" content="Alternative Solvers (Robust, GPU, B2B) · Unfold.jl Timeseries Analysis &amp; Deconvolution"/><meta name="description" content="Documentation for Unfold.jl Timeseries Analysis &amp; Deconvolution."/><meta property="og:description" content="Documentation for Unfold.jl Timeseries Analysis &amp; Deconvolution."/><meta property="twitter:description" content="Documentation for Unfold.jl Timeseries Analysis &amp; Deconvolution."/><script data-outdated-warner src="../../assets/warner.js"></script><link href="https://cdnjs.cloudflare.com/ajax/libs/lato-font/3.0.0/css/lato-font.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/juliamono/0.050/juliamono.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.8/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL="../.."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../../assets/documenter.js"></script><script src="../../search_index.js"></script><script src="../../siteinfo.js"></script><script src="../../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../../assets/themeswap.js"></script></head><body><div id="documenter"><nav class="docs-sidebar"><div class="docs-package-name"><span class="docs-autofit"><a href="../../">Unfold.jl Timeseries Analysis &amp; Deconvolution</a></span></div><button class="docs-search-query input is-rounded is-small is-clickable my-2 mx-auto py-1 px-2" id="documenter-search-query">Search docs (Ctrl + /)</button><ul class="docs-menu"><li><a class="tocitem" href="../../">Unfold Documentation</a></li><li><a class="tocitem" href="../../installation/">Installing Julia + Unfold.jl</a></li><li><span class="tocitem">Tutorials</span><ul><li><a class="tocitem" href="../../tutorials/lm_mu/">Mass univariate LM</a></li><li><a class="tocitem" href="../../tutorials/lm_overlap/">LM overlap correction</a></li><li><a class="tocitem" href="../../tutorials/lmm_mu/">Mass univariate Mixed Model</a></li><li><a class="tocitem" href="../../tutorials/lmm_overlap/">LMM + overlap correction</a></li></ul></li><li><span class="tocitem">HowTo</span><ul><li><a class="tocitem" href="../multiple_events/">Overlap: Multiple events</a></li><li><a class="tocitem" href="../pymne/">Import EEG with 🐍 PyMNE.jl</a></li><li><a class="tocitem" href="../standarderrors/">Standard errors</a></li><li class="is-active"><a class="tocitem" href>Alternative Solvers (Robust, GPU, B2B)</a></li><li><a class="tocitem" href="../../generated/HowTo/juliacall_unfold/">🐍 Calling Unfold.jl directly from Python</a></li><li><a class="tocitem" href="../lmm_pvalues/">P-values for mixedModels</a></li><li><a class="tocitem" href="../../generated/HowTo/effects/">Marginal effects (focus on non-linear predictors)</a></li><li><a class="tocitem" href="../../generated/HowTo/unfold_io/">Save and load Unfold models</a></li></ul></li><li><span class="tocitem">Explanations</span><ul><li><a class="tocitem" href="../../explanations/basisfunctions/">About basisfunctions</a></li><li><a class="tocitem" href="../../generated/explanations/nonlinear_effects/">Non-Linear effects</a></li><li><a class="tocitem" href="../../generated/explanations/window_length/">Window Length Effect</a></li></ul></li><li><span class="tocitem">Reference</span><ul><li><a class="tocitem" href="../../references/extensions/">Overview of package extensions</a></li><li><a class="tocitem" href="../../explanations/development/">Development environment</a></li><li><a class="tocitem" href="../../references/types/">API: Types</a></li><li><a class="tocitem" href="../../references/functions/">API: Functions</a></li></ul></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><a class="docs-sidebar-button docs-navbar-link fa-solid fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a><nav class="breadcrumb"><ul class="is-hidden-mobile"><li><a class="is-disabled">HowTo</a></li><li class="is-active"><a href>Alternative Solvers (Robust, GPU, B2B)</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Alternative Solvers (Robust, GPU, B2B)</a></li></ul></nav><div class="docs-right"><a class="docs-navbar-link" href="https://github.com/unfoldtoolbox/Unfold.jl" title="View the repository on GitHub"><span class="docs-icon fa-brands"></span><span class="docs-label is-hidden-touch">GitHub</span></a><a class="docs-navbar-link" href="https://github.com/unfoldtoolbox/Unfold.jl/blob/main/docs/src/HowTo/custom_solvers.md" title="Edit source on GitHub"><span class="docs-icon fa-solid"></span></a><a class="docs-settings-button docs-navbar-link fa-solid fa-gear" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-article-toggle-button fa-solid fa-chevron-up" id="documenter-article-toggle-button" href="javascript:;" title="Collapse all docstrings"></a></div></header><article class="content" id="documenter-page"><h1 id="custom_solvers"><a class="docs-heading-anchor" href="#custom_solvers">Custom Solvers</a><a id="custom_solvers-1"></a><a class="docs-heading-anchor-permalink" href="#custom_solvers" title="Permalink"></a></h1><h3 id="Setup-some-data"><a class="docs-heading-anchor" href="#Setup-some-data">Setup some data</a><a id="Setup-some-data-1"></a><a class="docs-heading-anchor-permalink" href="#Setup-some-data" title="Permalink"></a></h3><pre><code class="language- hljs">using Unfold
using UnfoldMakie, CairoMakie
using UnfoldSim,
dat,evts = UnfoldSim.predef_eeg(;noiselevel=10,return_epoched=true)

f = @formula 0~1+condition+continuous
designDict = Dict(Any=&gt;(f,range(0,1,length=size(dat,1))))
</code></pre><h3 id="GPU-Solvers"><a class="docs-heading-anchor" href="#GPU-Solvers">GPU Solvers</a><a id="GPU-Solvers-1"></a><a class="docs-heading-anchor-permalink" href="#GPU-Solvers" title="Permalink"></a></h3><p>GPU solvers can speed up your modelfit drastically! up to factor of 30 has been observed already</p><pre><code class="language-julia hljs">using Krylov,CUDA # necessary to load the right package extension
gpu_solver =(x,y)-&gt;Unfold.solver_krylov(x,y;GPU=true)
m = Unfold.fit(UnfoldModel,designDict,evts,dat,solver=gpu_solver)</code></pre><p>We can&#39;t run it on the docs though, so try it yourself! If you need something else than CUDA, write an issue, we cant test it with something else right now...</p><h3 id="Robust-Solvers"><a class="docs-heading-anchor" href="#Robust-Solvers">Robust Solvers</a><a id="Robust-Solvers-1"></a><a class="docs-heading-anchor-permalink" href="#Robust-Solvers" title="Permalink"></a></h3><p>Robust solvers automatically account for outlying trials. They come at a severe computational cost though!</p><pre><code class="language- hljs">using RobustModels # necessary to load the Unfold st
package extension
se_solver =(x,y)-&gt;Unfold.solver_robust(x,y)
m = Unfold.fit(UnfoldModel,designDict,evts,dat,solver=se_solver)
results =coeftable(m)
plot_erp(results;stderror=true)</code></pre><h3 id="Back2Back-regression"><a class="docs-heading-anchor" href="#Back2Back-regression">Back2Back regression</a><a id="Back2Back-regression-1"></a><a class="docs-heading-anchor-permalink" href="#Back2Back-regression" title="Permalink"></a></h3><pre><code class="language- hljs">b2b_solver = (x, y) -&gt; Unfold.solver_b2b(x, y;ross_val_reps = 5)
dat_3d = permutedims(repeat(dat,1,1,20),[3 1 2])
m = Unfold.fit(UnfoldModel, designDict, evts,dat_3d; solver=b2b_solver)
results = coeftable(m)

plot_erp(results)</code></pre><p>These are the decoding-results for <code>conditionA</code> while taking into account <code>conditionB</code> - and vice versa. </p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../standarderrors/">« Standard errors</a><a class="docs-footer-nextpage" href="../../generated/HowTo/juliacall_unfold/">🐍 Calling Unfold.jl directly from Python »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="auto">Automatic (OS)</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.2.1 on <span class="colophon-date" title="Monday 26 February 2024 14:20">Monday 26 February 2024</span>. Using Julia version 1.10.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
253 changes: 253 additions & 0 deletions previews/PR175/HowTo/juliacall_unfold.ipynb

Large diffs are not rendered by default.

Binary file added previews/PR175/HowTo/lmm_pvalues/64397379.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 50d34b7

Please sign in to comment.