Skip to content

Instantly share code, notes, and snippets.

View ogrisel's full-sized avatar

Olivier Grisel ogrisel

View GitHub Profile
"""
=======================
MNIST dataset benchmark
=======================
Benchmark multi-layer perceptron, Extra-Trees, linear svm
with kernel approximation of RBFSampler and Nystroem
on the MNIST dataset. The dataset comprises 70,000 samples
and 784 features. Here, we consider the task of predicting
10 classes - digits from 0 to 9. The experiment was run in
@ogrisel
ogrisel / Evaluation.ipynb
Last active August 29, 2015 13:56
minibatch reassignment strategies
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ogrisel
ogrisel / gist:09782a0544f989d32a93
Created June 9, 2014 15:17
Tests of sklearn 0.14.1 run vs sklearn 0.15.X
======================================================================
ERROR: cluster.bicluster.tests.test_utils.test_get_submatrix
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/ogrisel/venvs/py27/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/Users/ogrisel/code/scikit-learn-0.14.1/sklearn-noconflict/cluster/bicluster/tests/test_utils.py", line 43, in test_get_submatrix
assert_true(np.all(X != -1))
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/case.py", line 422, in assertTrue
if not expr:
import numpy as np
import sklearn
from sklearn.linear_model import SGDClassifier
from sklearn import grid_search
print("numpy:", np.__version__)
print("sklearn:", sklearn.__version__)
n_samples = 100000
n_features = 5000
PS C:\Users\Administrator> conda install mkl
Fetching package metadata: ..
Solving package specifications: .
Package plan for installation in environment C:\Anaconda:
The following packages will be downloaded:
package | build
---------------------------|-----------------
mkl-11.1 | np18py27_p3 4 KB
@ogrisel
ogrisel / log.txt
Created November 12, 2014 14:43
pip timeout
[04:02:35] %CMD_IN_ENV% pip install -r continuous_integration/appveyor/requirements.txt
[04:02:35] Configuring Windows SDK "v7.1" for Python "3" on a 64 bit architecture
[04:02:35] Setting SDK environment relative to C:\Program Files\Microsoft SDKs\Windows\v7.1\.
[04:02:51] Targeting Windows 7 x64 Release
[04:02:51]
[04:02:52] Executing: pip install -r continuous_integration/appveyor/requirements.txt
[04:02:52] Downloading/unpacking numpy==1.8.1 (from -r continuous_integration/appveyor/requirements.txt (line 11))
[04:02:57] http://28daf2247a33ed269873-7b1aad3fab3cc330e1fd9d109892382a.r6.cf2.rackcdn.com/index.html uses an insecure transport scheme (http). Consider using https if 28daf2247a33ed269873-7b1aad3fab3cc330e1fd9d109892382a.r6.cf2.rackcdn.com has it available
[04:02:59] Cleaning up...
[04:03:16] Exception:
@ogrisel
ogrisel / gist:74a4b8395f3a5e30e210
Created December 17, 2014 14:08
numpy msvc openblas
Build started
[13:49:54] git clone -q --branch=appveyor-ci git://github.com/ogrisel/numpy.git C:\projects\numpy
[13:50:03] git checkout -qf f4c020e5c19a1b499ff33fa663d6b0cf190875cc
[13:51:04] Running Install scripts
[13:51:06] powershell ./tools/appveyor/install.ps1
[13:51:06] Creating download folder at C:\Downloads
[13:51:16]
[13:51:17]
[13:51:17] Directory: C:\
[13:51:17]
@ogrisel
ogrisel / load_and_run.py
Last active August 29, 2015 14:14
pickle main: working on a modern replacement for cloudpickle based on dill
#!/usr/bin/env python
import dill
import sys
payload_filename = sys.argv[1]
if len(sys.argv) > 2:
print('Restoring __main__ context')
main_filename = sys.argv[2]
======================================================================
ERROR: test_fortran.test_fortranfiles_read
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\Administrator\venv\lib\site-packages\nose\case.py", line 198, in runTest
self.test(*self.arg)
File "C:\Users\Administrator\venv\lib\site-packages\scipy\io\tests\test_fortran.py", line 26, in test_fortranfiles_rea
d
data = f.read_record(dtype=m.group(1).replace('s', '<')).reshape(dims)
File "C:\Users\Administrator\venv\lib\site-packages\scipy\io\_fortran.py", line 176, in read_record
@ogrisel
ogrisel / 0.15.2.txt
Last active August 29, 2015 14:16
isotonic test failures
(py35)ogrisel@is146148:~/code/scikit-learn$ nosetests /tmp/test_isotonic.py
......FF/volatile/ogrisel/envs/py35/lib/python3.5/site-packages/scipy/interpolate/interpolate.py:466: RuntimeWarning: divide by zero encountered in true_divide
slope = (y_hi - y_lo) / (x_hi - x_lo)[:, None]
/volatile/ogrisel/envs/py35/lib/python3.5/site-packages/scipy/interpolate/interpolate.py:469: RuntimeWarning: invalid value encountered in multiply
y_new = slope*(x_new - x_lo)[:, None] + y_lo
F............./volatile/ogrisel/envs/py35/lib/python3.5/site-packages/scipy/interpolate/interpolate.py:466: RuntimeWarning: invalid value encountered in true_divide
slope = (y_hi - y_lo) / (x_hi - x_lo)[:, None]
F
======================================================================
FAIL: test_isotonic.test_isotonic_regression_ties_min