This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Author: denis.engemann@gmail.com | |
# License: simplified BSD (3 clause) | |
# Note: code is based on scipy.stats.pearsonr | |
from scipy import stats | |
def compute_corr(x, y): | |
x = np.asarray(x) | |
y = np.asarray(y) | |
mx = x.mean(axis=-1) | |
my = y.mean(axis=-1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" check single trial morphing + time series extraction | |
The Problem | |
----------- | |
establish equivalence across morphing + label extraction paths | |
mode : single trial, single trial averaged, evoked | |
morphing : sample, fsaverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# License: BSD (3-clause) | |
# Author: Denis A. Engemann <denis-alexander.engemann@inria.fr> | |
# Based on : | |
import platform | |
import psutil | |
import datetime | |
from time import time | |
import os |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# License: BSD (3-clause) | |
# Author: Denis A. Engemann <denis-alexander.engemann@inria.fr> | |
# Based on : | |
# https://gist.github.com/markus-beuckelmann/8bc25531b11158431a5b09a45abd6276 | |
import platform | |
import psutil | |
import datetime | |
from time import time |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# License: BSD (3-clause) | |
# Author: Denis A. Engemann <denis-alexander.engemann@inria.fr> | |
library(ggplot2) | |
library(tidymodels) | |
library(readr) | |
library(wesanderson) | |
hotels <- | |
read_csv('https://tidymodels.org/start/case-study/hotels.csv') %>% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# License: BSD (3-clause) | |
# Author: Denis A. Engemann <denis-alexander.engemann@inria.fr> | |
library(tidymodels) | |
library(readr) | |
library(microbenchmark) | |
hotels <- | |
read_csv('https://tidymodels.org/start/case-study/hotels.csv') %>% | |
mutate_if(is.character, as.factor) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Author: Denis A. Engemann <d.engemann@fz-juelich.de> | |
# | |
# License: BSD (3-clause) | |
""" Profile fast_dot versus np.dot | |
Dependencies | |
------------ | |
scikit-learn | |
https://github.com/fabianp/memory_profiler |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Author Denis A. Engemann <d.engemann@gmail.com> | |
# | |
# License: BSD (3-clause) | |
import numpy as np | |
import pandas as pd | |
def ci_within(df, indexvar, withinvars, measvar, confint=0.95, | |
copy=True): | |
""" Compute CI / SEM correction factor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Authors: Denis Engemann <denis.engemann@gmail.com> | |
# | |
# License: BSD 3-clause | |
""" Run complete ICA for MEG and EEG | |
This tutorial demonstrates how to perform an entire | |
preprocessing workflow for one subject and for different sensor types. | |
1) Filtering |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Authors: Denis A. Engemann <denis.engemann@gmail.com> | |
# | |
# License: BSD (3-clause) | |
from copy import deepcopy | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import mne | |
data_path = mne.datasets.somato.data_path() |
NewerOlder