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' |
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
| 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
| from scipy import stats | |
| class GaussianKernelDensityEstimation(object): | |
| """docstring for GaussianKernelDensityEstimation""" | |
| def __init__(self): | |
| self.gkde = None | |
| def fit(self, X): | |
| """docstring for fit""" | |
| self.gkde = stats.gaussian_kde(X.T) |
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
| """ | |
| ========================== | |
| Feature Selection Shootout | |
| ========================== | |
| Illustration of feature selection with : | |
| - RFE-SVC | |
| - Anova-SVC | |
| - L1-Logistic Regression | |
| """ |
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
| """ | |
| Author: Oliver Mitevski | |
| References: | |
| A Generalized Linear Model for Principal Component Analysis of Binary Data, | |
| Andrew I. Schein; Lawrence K. Saul; Lyle H. Ungar | |
| The code was translated and adapted from Jakob Verbeek's | |
| "Hidden Markov models and mixtures for Binary PCA" implementation in MATLAB |
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
| from pprint import pprint | |
| import numpy as np | |
| from scipy import sparse | |
| from scikits.learn.grid_search import GridSearchCV | |
| from scikits.learn.cross_val import StratifiedKFold | |
| from scikits.learn.metrics import f1_score, classification_report | |
| from scikits.learn import svm | |
| from scikits.learn.linear_model import LogisticRegression | |
| from scikits.learn.linear_model.sparse import LogisticRegression as SparseLogisticRegression |
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
| """Testing the difference between two coefficients of correlation | |
| Following: | |
| Thöni, H. (1977), Testing the Difference Between two Coefficients of Correlation. | |
| Biometrical Journal, 19: 355–359. doi: 10.1002/bimj.4710190506 | |
| http://onlinelibrary.wiley.com/doi/10.1002/bimj.4710190506/abstract | |
| """ | |
| from math import log, 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
| #!/usr/bin/env python | |
| """ | |
| Simple viewer for tri mesh files and OpenMEEG geometry files | |
| Usage | |
| ----- | |
| om_viz.py model.geom mesh1.tri mesh2.tri dipoles.txt |
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 linalg | |
| from sklearn import datasets, svm, linear_model | |
| from sklearn.svm import l1_min_c | |
| iris = datasets.load_iris() | |
| X = iris.data | |
| y = iris.target |
OlderNewer