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
# -*- coding: utf-8 -*- | |
""" | |
======================== | |
cam-CAN tutorial dataset | |
======================== | |
""" |
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
""" | |
============================== | |
Generate simulated evoked data | |
============================== | |
""" | |
# Author: Daniel Strohmeier <daniel.strohmeier@tu-ilmenau.de> | |
# Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> | |
# | |
# License: BSD (3-clause) |
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
""" | |
================================================================ | |
Benchmark pure python vs blas Block Coordinate Descent | |
================================================================ | |
References | |
---------- | |
.. [1] Gramfort A., Kowalski M. and Hamalainen, M. | |
"Mixed-norm estimates for the M/EEG inverse problem using accelerated | |
gradient methods", Physics in Medicine and Biology, 2012. |
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
""" | |
================================================================ | |
Compute sparse inverse solution with mixed norm: MxNE and irMxNE | |
================================================================ | |
Runs an (ir)MxNE (L1/L2 [1]_ or L0.5/L2 [2]_ mixed norm) inverse solver. | |
L0.5/L2 is done with irMxNE which allows for sparser | |
source estimates with less amplitude bias due to the non-convexity | |
of the L0.5/L2 mixed norm penalty. |
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
# By Jake VanderPlas | |
# License: BSD-style | |
import matplotlib.pyplot as plt | |
import numpy as np | |
def discrete_cmap(N, base_cmap=None): | |
"""Create an N-bin discrete colormap from the specified input map""" |
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
import numpy as np | |
import skglm | |
import celer | |
import sklearn.linear_model | |
import scipy.sparse as sp | |
def get_X_lasso(n, m): | |
""" Construction of design matrix H |