Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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 | |
from sklearn.datasets import fetch_covtype | |
from sklearn.ensemble import RandomForestClassifier | |
from sklearn.model_selection import StratifiedShuffleSplit | |
from sklearn.pipeline import Pipeline | |
from sklearn.preprocessing import Imputer | |
from sklearn.model_selection import cross_val_score | |
rng = np.random.RandomState(0) |
This file contains hidden or 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
#!/usr/bin/env python | |
# | |
# Solve LASSO regression problem with ISTA and FISTA | |
# iterative solvers. | |
# Author : Alexandre Gramfort, [email protected] | |
# License BSD | |
import time | |
from math import sqrt |
This file contains hidden or 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 time | |
import numpy as np | |
from scipy import linalg, io, sparse | |
import matplotlib.pyplot as plt | |
from sklearn.externals.joblib import Memory | |
from sklearn.linear_model import lasso_path | |
from sklearn.datasets.mldata import fetch_mldata | |
from sklearn import datasets |
This file contains hidden or 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 os | |
import neo | |
import numpy as np | |
import mne | |
dirname = './data_Micromed/' | |
trc_filename = 'EEG_33.TRC' | |
fname = os.path.join(dirname, trc_filename) | |
def raw_from_neo(fname): |
This file contains hidden or 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 | |
from scipy import signal | |
import mne | |
from mne import (read_forward_solution, read_cov, read_label, | |
pick_types_evoked, pick_types_forward, read_evokeds) | |
from mne.io import Raw | |
from mne.datasets import sample | |
from mne.time_frequency import iir_filter_raw, morlet | |
from mne.simulation import generate_sparse_stc |
This file contains hidden or 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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
"""Implements Partial Directed Coherence and Direct Transfer Function | |
using MVAR processes. | |
Reference | |
--------- | |
Luiz A. Baccala and Koichi Sameshima. Partial directed coherence: | |
a new concept in neural structure determination. |
This file contains hidden or 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 | |
from mayavi import mlab | |
from surfer import Brain | |
import mne | |
from mne.datasets import sample | |
data_path = sample.data_path() | |
subjects_dir = data_path + '/subjects' |
This file contains hidden or 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
returns: | |
27.0745537031 | |
365.073216463 | |
27.1356784749 |
This file contains hidden or 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 #################################################################### | |
import mne | |
import numpy as np | |
import os | |
from mne.datasets import sample | |
data_path = sample.data_path() | |
#%% load group avg data ####################################################### | |
os.environ["SUBJECTS_DIR"] = data_path + '/subjects' |