This document is a lightning talk: it only gives pointers, you need to Google and read references
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
### Keybase proof | |
I hereby claim: | |
* I am GaelVaroquaux on github. | |
* I am gaelvaroquaux (https://keybase.io/gaelvaroquaux) on keybase. | |
* I have a public key whose fingerprint is 44B8 B843 6321 47EB 59A9 8992 6C52 6A43 ABE0 36FC | |
To claim this, I am signing this object: |
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
"""A helper node to concatenate images in nipype""" | |
import os | |
from nipype.interfaces.base import TraitedSpec, File, CommandLineInputSpec, CommandLine | |
from nipype.utils.misc import isdefined | |
class ConcatImgInputSpec(CommandLineInputSpec): | |
in_file1 = File(exists=True, argstr="-append %s", | |
position=1, mandatory=True) |
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 | |
def _compute_bins(x, n_bins=10): | |
""" Find optimal bins from a univariate distribution | |
Parameters | |
=========== | |
x: 1D array-like | |
Samples | |
n_bins: integer |
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
#!/usr/bin/env python | |
# gvaroquaux (adapted from tdh.net gmail com) | |
# 31.August.2011 | |
# try clustering module in scikits.learn | |
import numpy as np | |
from scipy import linalg | |
from sklearn.metrics.pairwise import euclidean_distances | |
from sklearn.cluster import SpectralClustering |
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
""" | |
Benching I/O with joblib and other libraries. Comment and | |
un-comment what you are interested in. | |
Warning: this is slow, and the benchs are easily offset by other disk | |
activity. | |
""" | |
import os | |
import time | |
import shutil |
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
# Licence : BSD | |
# Author: Gael Varoquaux | |
from time import time | |
import numpy as np | |
import pylab as pl | |
from scipy import linalg, ndimage | |
from sklearn import linear_model |
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 sklearn.linear_model as lm | |
X = np.array([[ -2.18252949e-01, -8.21949578e-02, -4.64055457e-02, | |
-1.78405908e-01, -1.93863740e-01, 5.30667625e-02, | |
1.83851107e-01, 1.23426449e-01, 1.97396315e-01, | |
-2.12615837e-01, 7.06452283e-02, -1.94509405e-01, | |
-9.77929516e-02, 2.07135018e-01, -3.40368338e-02, | |
2.02970673e-01, -2.28669466e-01, 4.17398420e-02, | |
1.80163132e-01, 3.24254938e-02, -2.41198452e-03, |
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 matplotlib.pyplot as plt | |
from sklearn.linear_model import Lasso, lars_path | |
np.random.seed(42) | |
def gen_data(n, m, k): | |
X = np.random.randn(n, m) | |
w = np.zeros((m, 1)) | |
i = np.arange(0, m) |
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 matplotlib.pyplot as plt | |
from sklearn.linear_model import Ridge, Lasso | |
from sklearn.cross_validation import ShuffleSplit | |
from sklearn.grid_search import GridSearchCV | |
from sklearn.utils import check_random_state | |
from sklearn import datasets | |
OlderNewer