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 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
# Standard scientific Python imports | |
import pylab as pl | |
import numpy as np | |
from time import time | |
# Import datasets, classifiers and performance metrics | |
from sklearn import datasets, svm, pipeline | |
from sklearn.kernel_approximation import (RBFSampler, | |
Nystroem) | |
from sklearn.utils import shuffle |
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 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 itertools import product | |
from sklearn.decomposition import RandomizedPCA | |
from sklearn.datasets import fetch_mldata | |
from sklearn.utils import shuffle | |
mnist = fetch_mldata("MNIST original") | |
X_train, y_train = mnist.data[:60000] / 255., mnist.target[:60000] |
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
# Standard scientific Python imports | |
import pylab as pl | |
import numpy as np | |
from time import time | |
# Import datasets, classifiers and performance metrics | |
from sklearn import datasets, svm, pipeline | |
from sklearn.kernel_approximation import (RBFSampler, | |
Nystroem) | |
from sklearn.utils import shuffle |
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 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
====================================================================== | |
FAIL: Check that oob prediction is as acurate as | |
---------------------------------------------------------------------- | |
Traceback (most recent call last): | |
File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest | |
self.test(*self.arg) | |
File "/home/andy/sklearn_tests/sklearn/ensemble/tests/test_forest.py", line 198, in test_oob_score_classification | |
assert_almost_equal(training_score, clf.oob_score_) | |
File "/usr/lib/python2.7/dist-packages/numpy/testing/utils.py", line 468, in assert_almost_equal | |
raise AssertionError(msg) |
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 os | |
from glob import glob | |
import numpy as np | |
import matplotlib.pyplot as plt | |
from sklearn.svm import LinearSVC | |
from sklearn.metrics import accuracy_score, confusion_matrix |
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
from sklearn.cluster import KMeans | |
from sklearn.datasets import make_blobs | |
X, y = make_blobs() | |
KMeans(n_jobs=2).fit(X) | |
print("done") |