Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 | |
#from sklearn.datasets import fetch_mldata | |
from sklearn.datasets import load_digits | |
from pystruct.models import MultiClassClf | |
from pystruct.learners import FrankWolfeSSVM, SubgradientSSVM, NSlackSSVM, OneSlackSSVM | |
from pystruct.utils import AnalysisLogger | |
from sklearn.utils import shuffle |


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
28 | |
105 | |
0.232269334 | |
0.767730666 | |
0.30221087 | |
0.69778913 | |
0.260731565 | |
0.739268435 | |
0.461288309 | |
0.538711691 |
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") |
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
====================================================================== | |
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) |