|
Sergio Pascual |
3bd41f7 |
diff -ur scikit-learn-0.14.1/examples/applications/wikipedia_principal_eigenvector.py scikit-learn-0.14.1.joblib/examples/applications/wikipedia_principal_eigenvector.py
|
|
Sergio Pascual |
3bd41f7 |
--- scikit-learn-0.14.1/examples/applications/wikipedia_principal_eigenvector.py 2013-09-06 19:12:44.815336853 +0200
|
|
Sergio Pascual |
3bd41f7 |
+++ scikit-learn-0.14.1.joblib/examples/applications/wikipedia_principal_eigenvector.py 2013-09-06 19:09:40.269822610 +0200
|
|
Sergio Pascual |
3bd41f7 |
@@ -45,7 +45,7 @@
|
|
Sergio Pascual |
3bd41f7 |
from scipy import sparse
|
|
Sergio Pascual |
3bd41f7 |
|
|
Sergio Pascual |
3bd41f7 |
from sklearn.utils.extmath import randomized_svd
|
|
Sergio Pascual |
3bd41f7 |
-from sklearn.externals.joblib import Memory
|
|
Sergio Pascual |
3bd41f7 |
+from joblib import Memory
|
|
Sergio Pascual |
3bd41f7 |
|
|
Sergio Pascual |
3bd41f7 |
|
|
Sergio Pascual |
3bd41f7 |
print(__doc__)
|
|
Sergio Pascual |
3bd41f7 |
diff -ur scikit-learn-0.14.1/examples/cluster/plot_feature_agglomeration_vs_univariate_selection.py scikit-learn-0.14.1.joblib/examples/cluster/plot_feature_agglomeration_vs_univariate_selection.py
|
|
Sergio Pascual |
3bd41f7 |
--- scikit-learn-0.14.1/examples/cluster/plot_feature_agglomeration_vs_univariate_selection.py 2013-09-06 19:12:44.807336787 +0200
|
|
Sergio Pascual |
3bd41f7 |
+++ scikit-learn-0.14.1.joblib/examples/cluster/plot_feature_agglomeration_vs_univariate_selection.py 2013-09-06 19:09:40.010820490 +0200
|
|
Sergio Pascual |
3bd41f7 |
@@ -31,7 +31,7 @@
|
|
Sergio Pascual |
3bd41f7 |
from sklearn.linear_model import BayesianRidge
|
|
Sergio Pascual |
3bd41f7 |
from sklearn.pipeline import Pipeline
|
|
Sergio Pascual |
3bd41f7 |
from sklearn.grid_search import GridSearchCV
|
|
Sergio Pascual |
3bd41f7 |
-from sklearn.externals.joblib import Memory
|
|
Sergio Pascual |
3bd41f7 |
+from joblib import Memory
|
|
Sergio Pascual |
3bd41f7 |
from sklearn.cross_validation import KFold
|
|
Sergio Pascual |
3bd41f7 |
|
|
Sergio Pascual |
3bd41f7 |
###############################################################################
|
|
Sergio Pascual |
3bd41f7 |
diff -ur scikit-learn-0.14.1/sklearn/cluster/hierarchical.py scikit-learn-0.14.1.joblib/sklearn/cluster/hierarchical.py
|
|
Sergio Pascual |
3bd41f7 |
--- scikit-learn-0.14.1/sklearn/cluster/hierarchical.py 2013-09-06 19:12:45.005338414 +0200
|
|
Sergio Pascual |
3bd41f7 |
+++ scikit-learn-0.14.1.joblib/sklearn/cluster/hierarchical.py 2013-09-06 19:09:44.714858988 +0200
|
|
Sergio Pascual |
3bd41f7 |
@@ -15,7 +15,7 @@
|
|
Sergio Pascual |
3bd41f7 |
from scipy.cluster import hierarchy
|
|
Sergio Pascual |
3bd41f7 |
|
|
Sergio Pascual |
3bd41f7 |
from ..base import BaseEstimator, ClusterMixin
|
|
Sergio Pascual |
3bd41f7 |
-from ..externals.joblib import Memory
|
|
Sergio Pascual |
3bd41f7 |
+from joblib import Memory
|
|
Sergio Pascual |
3bd41f7 |
from ..externals import six
|
|
Sergio Pascual |
3bd41f7 |
from ..metrics import euclidean_distances
|
|
Sergio Pascual |
3bd41f7 |
from ..utils import array2d
|
|
Sergio Pascual |
3bd41f7 |
diff -ur scikit-learn-0.14.1/sklearn/cluster/k_means_.py scikit-learn-0.14.1.joblib/sklearn/cluster/k_means_.py
|
|
Sergio Pascual |
3bd41f7 |
--- scikit-learn-0.14.1/sklearn/cluster/k_means_.py 2013-09-06 19:12:45.008338439 +0200
|
|
Sergio Pascual |
3bd41f7 |
+++ scikit-learn-0.14.1.joblib/sklearn/cluster/k_means_.py 2013-09-06 19:09:44.760859364 +0200
|
|
Sergio Pascual |
3bd41f7 |
@@ -23,8 +23,8 @@
|
|
Sergio Pascual |
3bd41f7 |
from ..utils import check_random_state
|
|
Sergio Pascual |
3bd41f7 |
from ..utils import atleast2d_or_csr
|
|
Sergio Pascual |
3bd41f7 |
from ..utils import as_float_array
|
|
Sergio Pascual |
3bd41f7 |
-from ..externals.joblib import Parallel
|
|
Sergio Pascual |
3bd41f7 |
-from ..externals.joblib import delayed
|
|
Sergio Pascual |
3bd41f7 |
+from joblib import Parallel
|
|
Sergio Pascual |
3bd41f7 |
+from joblib import delayed
|
|
Sergio Pascual |
3bd41f7 |
|
|
Sergio Pascual |
3bd41f7 |
from . import _k_means
|
|
Sergio Pascual |
3bd41f7 |
|
|
Sergio Pascual |
3bd41f7 |
diff -ur scikit-learn-0.14.1/sklearn/covariance/graph_lasso_.py scikit-learn-0.14.1.joblib/sklearn/covariance/graph_lasso_.py
|
|
Sergio Pascual |
3bd41f7 |
--- scikit-learn-0.14.1/sklearn/covariance/graph_lasso_.py 2013-09-06 19:12:44.892337486 +0200
|
|
Sergio Pascual |
3bd41f7 |
+++ scikit-learn-0.14.1.joblib/sklearn/covariance/graph_lasso_.py 2013-09-06 19:09:41.852835565 +0200
|
|
Sergio Pascual |
3bd41f7 |
@@ -21,7 +21,7 @@
|
|
Sergio Pascual |
3bd41f7 |
from ..linear_model import lars_path
|
|
Sergio Pascual |
3bd41f7 |
from ..linear_model import cd_fast
|
|
Sergio Pascual |
3bd41f7 |
from ..cross_validation import check_cv, cross_val_score
|
|
Sergio Pascual |
3bd41f7 |
-from ..externals.joblib import Parallel, delayed
|
|
Sergio Pascual |
3bd41f7 |
+from joblib import Parallel, delayed
|
|
Sergio Pascual |
3bd41f7 |
import collections
|
|
Sergio Pascual |
3bd41f7 |
|
|
Sergio Pascual |
3bd41f7 |
|
|
Sergio Pascual |
3bd41f7 |
diff -ur scikit-learn-0.14.1/sklearn/cross_validation.py scikit-learn-0.14.1.joblib/sklearn/cross_validation.py
|
|
Sergio Pascual |
3bd41f7 |
--- scikit-learn-0.14.1/sklearn/cross_validation.py 2013-09-06 19:12:44.875337346 +0200
|
|
Sergio Pascual |
3bd41f7 |
+++ scikit-learn-0.14.1.joblib/sklearn/cross_validation.py 2013-09-06 19:09:41.485832562 +0200
|
|
Sergio Pascual |
3bd41f7 |
@@ -22,7 +22,7 @@
|
|
Sergio Pascual |
3bd41f7 |
from .base import is_classifier, clone
|
|
Sergio Pascual |
3bd41f7 |
from .utils import check_arrays, check_random_state, safe_mask
|
|
Sergio Pascual |
3bd41f7 |
from .utils.fixes import unique
|
|
Sergio Pascual |
3bd41f7 |
-from .externals.joblib import Parallel, delayed
|
|
Sergio Pascual |
3bd41f7 |
+from joblib import Parallel, delayed
|
|
Sergio Pascual |
3bd41f7 |
from .externals.six import string_types, with_metaclass
|
|
Sergio Pascual |
3bd41f7 |
from .metrics.scorer import _deprecate_loss_and_score_funcs
|
|
Sergio Pascual |
3bd41f7 |
|
|
Sergio Pascual |
3bd41f7 |
diff -ur scikit-learn-0.14.1/sklearn/datasets/california_housing.py scikit-learn-0.14.1.joblib/sklearn/datasets/california_housing.py
|
|
Sergio Pascual |
3bd41f7 |
--- scikit-learn-0.14.1/sklearn/datasets/california_housing.py 2013-09-06 19:12:44.951337971 +0200
|
|
Sergio Pascual |
3bd41f7 |
+++ scikit-learn-0.14.1.joblib/sklearn/datasets/california_housing.py 2013-09-06 19:09:43.522849233 +0200
|
|
Sergio Pascual |
3bd41f7 |
@@ -31,7 +31,7 @@
|
|
Sergio Pascual |
3bd41f7 |
import numpy as np
|
|
Sergio Pascual |
3bd41f7 |
|
|
Sergio Pascual |
3bd41f7 |
from .base import get_data_home, Bunch
|
|
Sergio Pascual |
3bd41f7 |
-from ..externals import joblib
|
|
Sergio Pascual |
3bd41f7 |
+import joblib
|
|
Sergio Pascual |
3bd41f7 |
|
|
Sergio Pascual |
3bd41f7 |
|
|
Sergio Pascual |
3bd41f7 |
DATA_URL = "http://lib.stat.cmu.edu/modules.php?op=modload&name=Downloads&"\
|
|
Sergio Pascual |
3bd41f7 |
diff -ur scikit-learn-0.14.1/sklearn/datasets/covtype.py scikit-learn-0.14.1.joblib/sklearn/datasets/covtype.py
|
|
Sergio Pascual |
3bd41f7 |
--- scikit-learn-0.14.1/sklearn/datasets/covtype.py 2013-09-06 19:12:44.949337954 +0200
|
|
Sergio Pascual |
3bd41f7 |
+++ scikit-learn-0.14.1.joblib/sklearn/datasets/covtype.py 2013-09-06 19:09:43.449848635 +0200
|
|
Sergio Pascual |
3bd41f7 |
@@ -23,7 +23,7 @@
|
|
Sergio Pascual |
3bd41f7 |
|
|
Sergio Pascual |
3bd41f7 |
from .base import get_data_home
|
|
Sergio Pascual |
3bd41f7 |
from .base import Bunch
|
|
Sergio Pascual |
3bd41f7 |
-from ..externals import joblib
|
|
Sergio Pascual |
3bd41f7 |
+import joblib
|
|
Sergio Pascual |
3bd41f7 |
from ..utils import check_random_state
|
|
Sergio Pascual |
3bd41f7 |
|
|
Sergio Pascual |
3bd41f7 |
|
|
Sergio Pascual |
3bd41f7 |
diff -ur scikit-learn-0.14.1/sklearn/datasets/lfw.py scikit-learn-0.14.1.joblib/sklearn/datasets/lfw.py
|
|
Sergio Pascual |
3bd41f7 |
--- scikit-learn-0.14.1/sklearn/datasets/lfw.py 2013-09-06 19:12:44.948337946 +0200
|
|
Sergio Pascual |
3bd41f7 |
+++ scikit-learn-0.14.1.joblib/sklearn/datasets/lfw.py 2013-09-06 19:09:43.439848553 +0200
|
|
Sergio Pascual |
3bd41f7 |
@@ -31,7 +31,7 @@
|
|
Sergio Pascual |
3bd41f7 |
import urllib
|
|
Sergio Pascual |
3bd41f7 |
|
|
Sergio Pascual |
3bd41f7 |
from .base import get_data_home, Bunch
|
|
Sergio Pascual |
3bd41f7 |
-from ..externals.joblib import Memory
|
|
Sergio Pascual |
3bd41f7 |
+from joblib import Memory
|
|
Sergio Pascual |
3bd41f7 |
|
|
Sergio Pascual |
3bd41f7 |
from ..externals.six import b, u
|
|
Sergio Pascual |
3bd41f7 |
|
|
Sergio Pascual |
3bd41f7 |
diff -ur scikit-learn-0.14.1/sklearn/datasets/olivetti_faces.py scikit-learn-0.14.1.joblib/sklearn/datasets/olivetti_faces.py
|
|
Sergio Pascual |
3bd41f7 |
--- scikit-learn-0.14.1/sklearn/datasets/olivetti_faces.py 2013-09-06 19:12:44.947337938 +0200
|
|
Sergio Pascual |
3bd41f7 |
+++ scikit-learn-0.14.1.joblib/sklearn/datasets/olivetti_faces.py 2013-09-06 19:09:43.400848234 +0200
|
|
Sergio Pascual |
3bd41f7 |
@@ -39,7 +39,7 @@
|
|
Sergio Pascual |
3bd41f7 |
|
|
Sergio Pascual |
3bd41f7 |
from .base import get_data_home, Bunch
|
|
Sergio Pascual |
3bd41f7 |
from ..utils import check_random_state
|
|
Sergio Pascual |
3bd41f7 |
-from ..externals import joblib
|
|
Sergio Pascual |
3bd41f7 |
+import joblib
|
|
Sergio Pascual |
3bd41f7 |
|
|
Sergio Pascual |
3bd41f7 |
|
|
Sergio Pascual |
3bd41f7 |
DATA_URL = "http://cs.nyu.edu/~roweis/data/olivettifaces.mat"
|
|
Sergio Pascual |
3bd41f7 |
diff -ur scikit-learn-0.14.1/sklearn/datasets/species_distributions.py scikit-learn-0.14.1.joblib/sklearn/datasets/species_distributions.py
|
|
Sergio Pascual |
3bd41f7 |
--- scikit-learn-0.14.1/sklearn/datasets/species_distributions.py 2013-09-06 19:12:44.950337962 +0200
|
|
Sergio Pascual |
3bd41f7 |
+++ scikit-learn-0.14.1.joblib/sklearn/datasets/species_distributions.py 2013-09-06 19:09:43.477848864 +0200
|
|
Sergio Pascual |
3bd41f7 |
@@ -50,7 +50,7 @@
|
|
Sergio Pascual |
3bd41f7 |
import numpy as np
|
|
Sergio Pascual |
3bd41f7 |
|
|
Sergio Pascual |
3bd41f7 |
from sklearn.datasets.base import get_data_home, Bunch
|
|
Sergio Pascual |
3bd41f7 |
-from sklearn.externals import joblib
|
|
Sergio Pascual |
3bd41f7 |
+import joblib
|
|
Sergio Pascual |
3bd41f7 |
|
|
Sergio Pascual |
3bd41f7 |
DIRECTORY_URL = "http://www.cs.princeton.edu/~schapire/maxent/datasets/"
|
|
Sergio Pascual |
3bd41f7 |
|
|
Sergio Pascual |
3bd41f7 |
diff -ur scikit-learn-0.14.1/sklearn/datasets/twenty_newsgroups.py scikit-learn-0.14.1.joblib/sklearn/datasets/twenty_newsgroups.py
|
|
Sergio Pascual |
3bd41f7 |
--- scikit-learn-0.14.1/sklearn/datasets/twenty_newsgroups.py 2013-09-06 19:12:44.949337954 +0200
|
|
Sergio Pascual |
3bd41f7 |
+++ scikit-learn-0.14.1.joblib/sklearn/datasets/twenty_newsgroups.py 2013-09-06 19:09:43.464848758 +0200
|
|
Sergio Pascual |
3bd41f7 |
@@ -52,7 +52,7 @@
|
|
Sergio Pascual |
3bd41f7 |
from ..utils.fixes import in1d
|
|
Sergio Pascual |
3bd41f7 |
from ..feature_extraction.text import CountVectorizer
|
|
Sergio Pascual |
3bd41f7 |
from ..preprocessing import normalize
|
|
Sergio Pascual |
3bd41f7 |
-from ..externals import joblib, six
|
|
Sergio Pascual |
84acc60 |
+import joblib; from ..externals import six
|
|
Sergio Pascual |
3bd41f7 |
|
|
Sergio Pascual |
3bd41f7 |
if six.PY3:
|
|
Sergio Pascual |
3bd41f7 |
from urllib.request import urlopen
|
|
Sergio Pascual |
3bd41f7 |
diff -ur scikit-learn-0.14.1/sklearn/decomposition/dict_learning.py scikit-learn-0.14.1.joblib/sklearn/decomposition/dict_learning.py
|
|
Sergio Pascual |
3bd41f7 |
--- scikit-learn-0.14.1/sklearn/decomposition/dict_learning.py 2013-09-06 19:12:44.900337552 +0200
|
|
Sergio Pascual |
3bd41f7 |
+++ scikit-learn-0.14.1.joblib/sklearn/decomposition/dict_learning.py 2013-09-06 19:09:42.042837120 +0200
|
|
Sergio Pascual |
3bd41f7 |
@@ -15,7 +15,7 @@
|
|
Sergio Pascual |
3bd41f7 |
from numpy.lib.stride_tricks import as_strided
|
|
Sergio Pascual |
3bd41f7 |
|
|
Sergio Pascual |
3bd41f7 |
from ..base import BaseEstimator, TransformerMixin
|
|
Sergio Pascual |
3bd41f7 |
-from ..externals.joblib import Parallel, delayed, cpu_count
|
|
Sergio Pascual |
3bd41f7 |
+from joblib import Parallel, delayed, cpu_count
|
|
Sergio Pascual |
3bd41f7 |
from ..externals.six.moves import zip
|
|
Sergio Pascual |
3bd41f7 |
from ..utils import array2d, check_random_state, gen_even_slices
|
|
Sergio Pascual |
3bd41f7 |
from ..utils.extmath import randomized_svd
|
|
Sergio Pascual |
3bd41f7 |
diff -ur scikit-learn-0.14.1/sklearn/decomposition/tests/test_sparse_pca.py scikit-learn-0.14.1.joblib/sklearn/decomposition/tests/test_sparse_pca.py
|
|
Sergio Pascual |
3bd41f7 |
--- scikit-learn-0.14.1/sklearn/decomposition/tests/test_sparse_pca.py 2013-09-06 19:12:44.906337601 +0200
|
|
Sergio Pascual |
3bd41f7 |
+++ scikit-learn-0.14.1.joblib/sklearn/decomposition/tests/test_sparse_pca.py 2013-09-06 19:09:42.197838389 +0200
|
|
Sergio Pascual |
3bd41f7 |
@@ -65,7 +65,7 @@
|
|
Sergio Pascual |
3bd41f7 |
U1 = spca_lars.transform(Y)
|
|
Sergio Pascual |
3bd41f7 |
# Test multiple CPUs
|
|
Sergio Pascual |
3bd41f7 |
if sys.platform == 'win32': # fake parallelism for win32
|
|
Sergio Pascual |
3bd41f7 |
- import sklearn.externals.joblib.parallel as joblib_par
|
|
Sergio Pascual |
3bd41f7 |
+ import joblib.parallel as joblib_par
|
|
Sergio Pascual |
3bd41f7 |
_mp = joblib_par.multiprocessing
|
|
Sergio Pascual |
3bd41f7 |
joblib_par.multiprocessing = None
|
|
Sergio Pascual |
3bd41f7 |
try:
|
|
Sergio Pascual |
3bd41f7 |
@@ -144,7 +144,7 @@
|
|
Sergio Pascual |
3bd41f7 |
U1 = spca_lars.transform(Y)
|
|
Sergio Pascual |
3bd41f7 |
# Test multiple CPUs
|
|
Sergio Pascual |
3bd41f7 |
if sys.platform == 'win32': # fake parallelism for win32
|
|
Sergio Pascual |
3bd41f7 |
- import sklearn.externals.joblib.parallel as joblib_par
|
|
Sergio Pascual |
3bd41f7 |
+ import joblib.parallel as joblib_par
|
|
Sergio Pascual |
3bd41f7 |
_mp = joblib_par.multiprocessing
|
|
Sergio Pascual |
3bd41f7 |
joblib_par.multiprocessing = None
|
|
Sergio Pascual |
3bd41f7 |
try:
|
|
Sergio Pascual |
3bd41f7 |
diff -ur scikit-learn-0.14.1/sklearn/ensemble/forest.py scikit-learn-0.14.1.joblib/sklearn/ensemble/forest.py
|
|
Sergio Pascual |
3bd41f7 |
--- scikit-learn-0.14.1/sklearn/ensemble/forest.py 2013-09-06 19:12:44.850337140 +0200
|
|
Sergio Pascual |
3bd41f7 |
+++ scikit-learn-0.14.1.joblib/sklearn/ensemble/forest.py 2013-09-06 19:09:41.000828593 +0200
|
|
Sergio Pascual |
3bd41f7 |
@@ -44,7 +44,7 @@
|
|
Sergio Pascual |
3bd41f7 |
from abc import ABCMeta, abstractmethod
|
|
Sergio Pascual |
3bd41f7 |
|
|
Sergio Pascual |
3bd41f7 |
from ..base import ClassifierMixin, RegressorMixin
|
|
Sergio Pascual |
3bd41f7 |
-from ..externals.joblib import Parallel, delayed, cpu_count
|
|
Sergio Pascual |
3bd41f7 |
+from joblib import Parallel, delayed, cpu_count
|
|
Sergio Pascual |
3bd41f7 |
from ..externals import six
|
|
Sergio Pascual |
3bd41f7 |
from ..externals.six.moves import xrange
|
|
Sergio Pascual |
3bd41f7 |
from ..feature_selection.from_model import _LearntSelectorMixin
|
|
Sergio Pascual |
3bd41f7 |
diff -ur scikit-learn-0.14.1/sklearn/ensemble/partial_dependence.py scikit-learn-0.14.1.joblib/sklearn/ensemble/partial_dependence.py
|
|
Sergio Pascual |
3bd41f7 |
--- scikit-learn-0.14.1/sklearn/ensemble/partial_dependence.py 2013-09-06 19:12:44.839337050 +0200
|
|
Sergio Pascual |
3bd41f7 |
+++ scikit-learn-0.14.1.joblib/sklearn/ensemble/partial_dependence.py 2013-09-06 19:09:40.788826858 +0200
|
|
Sergio Pascual |
3bd41f7 |
@@ -14,7 +14,7 @@
|
|
Sergio Pascual |
3bd41f7 |
from scipy.stats.mstats import mquantiles
|
|
Sergio Pascual |
3bd41f7 |
|
|
Sergio Pascual |
3bd41f7 |
from ..utils.extmath import cartesian
|
|
Sergio Pascual |
3bd41f7 |
-from ..externals.joblib import Parallel, delayed
|
|
Sergio Pascual |
3bd41f7 |
+from joblib import Parallel, delayed
|
|
Sergio Pascual |
3bd41f7 |
from ..externals import six
|
|
Sergio Pascual |
3bd41f7 |
from ..externals.six.moves import xrange
|
|
Sergio Pascual |
3bd41f7 |
from ..utils import array2d
|
|
Sergio Pascual |
3bd41f7 |
diff -ur scikit-learn-0.14.1/sklearn/externals/joblib/__init__.py scikit-learn-0.14.1.joblib/sklearn/externals/joblib/__init__.py
|
|
Sergio Pascual |
3bd41f7 |
--- scikit-learn-0.14.1/sklearn/externals/joblib/__init__.py 2013-09-06 19:12:44.927337773 +0200
|
|
Sergio Pascual |
3bd41f7 |
+++ scikit-learn-0.14.1.joblib/sklearn/externals/joblib/__init__.py 2013-09-06 19:09:42.805843365 +0200
|
|
Sergio Pascual |
3bd41f7 |
@@ -61,7 +61,7 @@
|
|
Sergio Pascual |
3bd41f7 |
computation to disk and rerun it only if necessary::
|
|
Sergio Pascual |
3bd41f7 |
|
|
Sergio Pascual |
3bd41f7 |
>>> import numpy as np
|
|
Sergio Pascual |
3bd41f7 |
- >>> from sklearn.externals.joblib import Memory
|
|
Sergio Pascual |
3bd41f7 |
+ >>> from joblib import Memory
|
|
Sergio Pascual |
3bd41f7 |
>>> mem = Memory(cachedir='/tmp/joblib')
|
|
Sergio Pascual |
3bd41f7 |
>>> import numpy as np
|
|
Sergio Pascual |
3bd41f7 |
>>> a = np.vander(np.arange(3)).astype(np.float)
|
|
Sergio Pascual |
3bd41f7 |
@@ -80,7 +80,7 @@
|
|
Sergio Pascual |
3bd41f7 |
2) **Embarrassingly parallel helper:** to make is easy to write readable
|
|
Sergio Pascual |
3bd41f7 |
parallel code and debug it quickly::
|
|
Sergio Pascual |
3bd41f7 |
|
|
Sergio Pascual |
3bd41f7 |
- >>> from sklearn.externals.joblib import Parallel, delayed
|
|
Sergio Pascual |
3bd41f7 |
+ >>> from joblib import Parallel, delayed
|
|
Sergio Pascual |
3bd41f7 |
>>> from math import sqrt
|
|
Sergio Pascual |
3bd41f7 |
>>> Parallel(n_jobs=1)(delayed(sqrt)(i**2) for i in range(10))
|
|
Sergio Pascual |
3bd41f7 |
[0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0]
|
|
Sergio Pascual |
3bd41f7 |
diff -ur scikit-learn-0.14.1/sklearn/externals/joblib/parallel.py scikit-learn-0.14.1.joblib/sklearn/externals/joblib/parallel.py
|
|
Sergio Pascual |
3bd41f7 |
--- scikit-learn-0.14.1/sklearn/externals/joblib/parallel.py 2013-09-06 19:12:44.928337782 +0200
|
|
Sergio Pascual |
3bd41f7 |
+++ scikit-learn-0.14.1.joblib/sklearn/externals/joblib/parallel.py 2013-09-06 19:09:42.824843520 +0200
|
|
Sergio Pascual |
3bd41f7 |
@@ -204,7 +204,7 @@
|
|
Sergio Pascual |
3bd41f7 |
A simple example:
|
|
Sergio Pascual |
3bd41f7 |
|
|
Sergio Pascual |
3bd41f7 |
>>> from math import sqrt
|
|
Sergio Pascual |
3bd41f7 |
- >>> from sklearn.externals.joblib import Parallel, delayed
|
|
Sergio Pascual |
3bd41f7 |
+ >>> from joblib import Parallel, delayed
|
|
Sergio Pascual |
3bd41f7 |
>>> Parallel(n_jobs=1)(delayed(sqrt)(i**2) for i in range(10))
|
|
Sergio Pascual |
3bd41f7 |
[0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0]
|
|
Sergio Pascual |
3bd41f7 |
|
|
Sergio Pascual |
3bd41f7 |
@@ -212,7 +212,7 @@
|
|
Sergio Pascual |
3bd41f7 |
values:
|
|
Sergio Pascual |
3bd41f7 |
|
|
Sergio Pascual |
3bd41f7 |
>>> from math import modf
|
|
Sergio Pascual |
3bd41f7 |
- >>> from sklearn.externals.joblib import Parallel, delayed
|
|
Sergio Pascual |
3bd41f7 |
+ >>> from joblib import Parallel, delayed
|
|
Sergio Pascual |
3bd41f7 |
>>> r = Parallel(n_jobs=1)(delayed(modf)(i/2.) for i in range(10))
|
|
Sergio Pascual |
3bd41f7 |
>>> res, i = zip(*r)
|
|
Sergio Pascual |
3bd41f7 |
>>> res
|
|
Sergio Pascual |
3bd41f7 |
@@ -224,7 +224,7 @@
|
|
Sergio Pascual |
3bd41f7 |
messages::
|
|
Sergio Pascual |
3bd41f7 |
|
|
Sergio Pascual |
3bd41f7 |
>>> from time import sleep
|
|
Sergio Pascual |
3bd41f7 |
- >>> from sklearn.externals.joblib import Parallel, delayed
|
|
Sergio Pascual |
3bd41f7 |
+ >>> from joblib import Parallel, delayed
|
|
Sergio Pascual |
3bd41f7 |
>>> r = Parallel(n_jobs=2, verbose=5)(delayed(sleep)(.1) for _ in range(10)) #doctest: +SKIP
|
|
Sergio Pascual |
3bd41f7 |
[Parallel(n_jobs=2)]: Done 1 out of 10 | elapsed: 0.1s remaining: 0.9s
|
|
Sergio Pascual |
3bd41f7 |
[Parallel(n_jobs=2)]: Done 3 out of 10 | elapsed: 0.2s remaining: 0.5s
|
|
Sergio Pascual |
3bd41f7 |
@@ -238,7 +238,7 @@
|
|
Sergio Pascual |
3bd41f7 |
child process::
|
|
Sergio Pascual |
3bd41f7 |
|
|
Sergio Pascual |
3bd41f7 |
>>> from heapq import nlargest
|
|
Sergio Pascual |
3bd41f7 |
- >>> from sklearn.externals.joblib import Parallel, delayed
|
|
Sergio Pascual |
3bd41f7 |
+ >>> from joblib import Parallel, delayed
|
|
Sergio Pascual |
3bd41f7 |
>>> Parallel(n_jobs=2)(delayed(nlargest)(2, n) for n in (range(4), 'abcde', 3)) #doctest: +SKIP
|
|
Sergio Pascual |
3bd41f7 |
#...
|
|
Sergio Pascual |
3bd41f7 |
---------------------------------------------------------------------------
|
|
Sergio Pascual |
3bd41f7 |
@@ -270,7 +270,7 @@
|
|
Sergio Pascual |
3bd41f7 |
number of iterations cannot be reported in the progress messages::
|
|
Sergio Pascual |
3bd41f7 |
|
|
Sergio Pascual |
3bd41f7 |
>>> from math import sqrt
|
|
Sergio Pascual |
3bd41f7 |
- >>> from sklearn.externals.joblib import Parallel, delayed
|
|
Sergio Pascual |
3bd41f7 |
+ >>> from joblib import Parallel, delayed
|
|
Sergio Pascual |
3bd41f7 |
|
|
Sergio Pascual |
3bd41f7 |
>>> def producer():
|
|
Sergio Pascual |
3bd41f7 |
... for i in range(6):
|
|
Sergio Pascual |
3bd41f7 |
diff -ur scikit-learn-0.14.1/sklearn/externals/setup.py scikit-learn-0.14.1.joblib/sklearn/externals/setup.py
|
|
Sergio Pascual |
3bd41f7 |
--- scikit-learn-0.14.1/sklearn/externals/setup.py 2013-09-06 19:12:44.930337798 +0200
|
|
Sergio Pascual |
3bd41f7 |
+++ scikit-learn-0.14.1.joblib/sklearn/externals/setup.py 2013-09-06 19:12:23.764163896 +0200
|
|
Sergio Pascual |
3bd41f7 |
@@ -4,7 +4,5 @@
|
|
Sergio Pascual |
3bd41f7 |
def configuration(parent_package='', top_path=None):
|
|
Sergio Pascual |
3bd41f7 |
from numpy.distutils.misc_util import Configuration
|
|
Sergio Pascual |
3bd41f7 |
config = Configuration('externals', parent_package, top_path)
|
|
Sergio Pascual |
3bd41f7 |
- config.add_subpackage('joblib')
|
|
Sergio Pascual |
3bd41f7 |
- config.add_subpackage('joblib/test')
|
|
Sergio Pascual |
3bd41f7 |
|
|
Sergio Pascual |
3bd41f7 |
return config
|
|
Sergio Pascual |
3bd41f7 |
diff -ur scikit-learn-0.14.1/sklearn/grid_search.py scikit-learn-0.14.1.joblib/sklearn/grid_search.py
|
|
Sergio Pascual |
3bd41f7 |
--- scikit-learn-0.14.1/sklearn/grid_search.py 2013-09-06 19:12:44.886337436 +0200
|
|
Sergio Pascual |
3bd41f7 |
+++ scikit-learn-0.14.1.joblib/sklearn/grid_search.py 2013-09-06 19:09:41.714834436 +0200
|
|
Sergio Pascual |
3bd41f7 |
@@ -24,7 +24,7 @@
|
|
Sergio Pascual |
3bd41f7 |
from .base import BaseEstimator, is_classifier, clone
|
|
Sergio Pascual |
3bd41f7 |
from .base import MetaEstimatorMixin
|
|
Sergio Pascual |
3bd41f7 |
from .cross_validation import check_cv
|
|
Sergio Pascual |
3bd41f7 |
-from .externals.joblib import Parallel, delayed, logger
|
|
Sergio Pascual |
3bd41f7 |
+from joblib import Parallel, delayed, logger
|
|
Sergio Pascual |
3bd41f7 |
from .externals import six
|
|
Sergio Pascual |
3bd41f7 |
from .utils import safe_mask, check_random_state
|
|
Sergio Pascual |
3bd41f7 |
from .utils.validation import _num_samples, check_arrays
|
|
Sergio Pascual |
3bd41f7 |
diff -ur scikit-learn-0.14.1/sklearn/linear_model/base.py scikit-learn-0.14.1.joblib/sklearn/linear_model/base.py
|
|
Sergio Pascual |
3bd41f7 |
--- scikit-learn-0.14.1/sklearn/linear_model/base.py 2013-09-06 19:12:44.970338127 +0200
|
|
Sergio Pascual |
3bd41f7 |
+++ scikit-learn-0.14.1.joblib/sklearn/linear_model/base.py 2013-09-06 19:09:43.929852563 +0200
|
|
Sergio Pascual |
3bd41f7 |
@@ -21,7 +21,7 @@
|
|
Sergio Pascual |
3bd41f7 |
from scipy import sparse
|
|
Sergio Pascual |
3bd41f7 |
|
|
Sergio Pascual |
3bd41f7 |
from ..externals import six
|
|
Sergio Pascual |
3bd41f7 |
-from ..externals.joblib import Parallel, delayed
|
|
Sergio Pascual |
3bd41f7 |
+from joblib import Parallel, delayed
|
|
Sergio Pascual |
3bd41f7 |
from ..base import BaseEstimator, ClassifierMixin, RegressorMixin
|
|
Sergio Pascual |
3bd41f7 |
from ..utils import as_float_array, atleast2d_or_csr, safe_asarray
|
|
Sergio Pascual |
3bd41f7 |
from ..utils.extmath import safe_sparse_dot
|
|
Sergio Pascual |
3bd41f7 |
diff -ur scikit-learn-0.14.1/sklearn/linear_model/coordinate_descent.py scikit-learn-0.14.1.joblib/sklearn/linear_model/coordinate_descent.py
|
|
Sergio Pascual |
3bd41f7 |
--- scikit-learn-0.14.1/sklearn/linear_model/coordinate_descent.py 2013-09-06 19:12:44.962338061 +0200
|
|
Sergio Pascual |
3bd41f7 |
+++ scikit-learn-0.14.1.joblib/sklearn/linear_model/coordinate_descent.py 2013-09-06 19:09:43.786851393 +0200
|
|
Sergio Pascual |
3bd41f7 |
@@ -19,7 +19,7 @@
|
|
Sergio Pascual |
3bd41f7 |
from .base import center_data
|
|
Sergio Pascual |
3bd41f7 |
from ..utils import array2d, atleast2d_or_csc, deprecated
|
|
Sergio Pascual |
3bd41f7 |
from ..cross_validation import check_cv
|
|
Sergio Pascual |
3bd41f7 |
-from ..externals.joblib import Parallel, delayed
|
|
Sergio Pascual |
3bd41f7 |
+from joblib import Parallel, delayed
|
|
Sergio Pascual |
3bd41f7 |
from ..externals import six
|
|
Sergio Pascual |
3bd41f7 |
from ..externals.six.moves import xrange
|
|
Sergio Pascual |
3bd41f7 |
from ..utils.extmath import safe_sparse_dot
|
|
Sergio Pascual |
3bd41f7 |
diff -ur scikit-learn-0.14.1/sklearn/linear_model/least_angle.py scikit-learn-0.14.1.joblib/sklearn/linear_model/least_angle.py
|
|
Sergio Pascual |
3bd41f7 |
--- scikit-learn-0.14.1/sklearn/linear_model/least_angle.py 2013-09-06 19:12:44.967338102 +0200
|
|
Sergio Pascual |
3bd41f7 |
+++ scikit-learn-0.14.1.joblib/sklearn/linear_model/least_angle.py 2013-09-06 19:09:43.876852130 +0200
|
|
Sergio Pascual |
3bd41f7 |
@@ -22,7 +22,7 @@
|
|
Sergio Pascual |
3bd41f7 |
from ..base import RegressorMixin
|
|
Sergio Pascual |
3bd41f7 |
from ..utils import array2d, arrayfuncs, as_float_array
|
|
Sergio Pascual |
3bd41f7 |
from ..cross_validation import check_cv
|
|
Sergio Pascual |
3bd41f7 |
-from ..externals.joblib import Parallel, delayed
|
|
Sergio Pascual |
3bd41f7 |
+from joblib import Parallel, delayed
|
|
Sergio Pascual |
3bd41f7 |
from ..externals.six.moves import xrange
|
|
Sergio Pascual |
3bd41f7 |
|
|
Sergio Pascual |
3bd41f7 |
|
|
Sergio Pascual |
3bd41f7 |
diff -ur scikit-learn-0.14.1/sklearn/linear_model/omp.py scikit-learn-0.14.1.joblib/sklearn/linear_model/omp.py
|
|
Sergio Pascual |
3bd41f7 |
--- scikit-learn-0.14.1/sklearn/linear_model/omp.py 2013-09-06 19:12:44.969338119 +0200
|
|
Sergio Pascual |
3bd41f7 |
+++ scikit-learn-0.14.1.joblib/sklearn/linear_model/omp.py 2013-09-06 19:09:43.901852334 +0200
|
|
Sergio Pascual |
3bd41f7 |
@@ -15,7 +15,7 @@
|
|
Sergio Pascual |
3bd41f7 |
from ..base import RegressorMixin
|
|
Sergio Pascual |
3bd41f7 |
from ..utils import array2d, as_float_array
|
|
Sergio Pascual |
3bd41f7 |
from ..cross_validation import check_cv
|
|
Sergio Pascual |
3bd41f7 |
-from ..externals.joblib import Parallel, delayed
|
|
Sergio Pascual |
3bd41f7 |
+from joblib import Parallel, delayed
|
|
Sergio Pascual |
3bd41f7 |
from ..utils.arrayfuncs import solve_triangular
|
|
Sergio Pascual |
3bd41f7 |
|
|
Sergio Pascual |
3bd41f7 |
premature = """ Orthogonal matching pursuit ended prematurely due to linear
|
|
Sergio Pascual |
3bd41f7 |
diff -ur scikit-learn-0.14.1/sklearn/linear_model/randomized_l1.py scikit-learn-0.14.1.joblib/sklearn/linear_model/randomized_l1.py
|
|
Sergio Pascual |
3bd41f7 |
--- scikit-learn-0.14.1/sklearn/linear_model/randomized_l1.py 2013-09-06 19:12:44.963338069 +0200
|
|
Sergio Pascual |
3bd41f7 |
+++ scikit-learn-0.14.1.joblib/sklearn/linear_model/randomized_l1.py 2013-09-06 19:09:43.818851655 +0200
|
|
Sergio Pascual |
3bd41f7 |
@@ -17,7 +17,7 @@
|
|
Sergio Pascual |
3bd41f7 |
from .base import center_data
|
|
Sergio Pascual |
3bd41f7 |
from ..base import BaseEstimator, TransformerMixin
|
|
Sergio Pascual |
3bd41f7 |
from ..externals import six
|
|
Sergio Pascual |
3bd41f7 |
-from ..externals.joblib import Memory, Parallel, delayed
|
|
Sergio Pascual |
3bd41f7 |
+from joblib import Memory, Parallel, delayed
|
|
Sergio Pascual |
3bd41f7 |
from ..utils import (as_float_array, check_random_state, safe_asarray,
|
|
Sergio Pascual |
3bd41f7 |
check_arrays, safe_mask)
|
|
Sergio Pascual |
3bd41f7 |
from .least_angle import lars_path, LassoLarsIC
|
|
Sergio Pascual |
3bd41f7 |
diff -ur scikit-learn-0.14.1/sklearn/linear_model/stochastic_gradient.py scikit-learn-0.14.1.joblib/sklearn/linear_model/stochastic_gradient.py
|
|
Sergio Pascual |
3bd41f7 |
--- scikit-learn-0.14.1/sklearn/linear_model/stochastic_gradient.py 2013-09-06 19:12:44.974338160 +0200
|
|
Sergio Pascual |
3bd41f7 |
+++ scikit-learn-0.14.1.joblib/sklearn/linear_model/stochastic_gradient.py 2013-09-06 19:09:43.990853063 +0200
|
|
Sergio Pascual |
3bd41f7 |
@@ -10,7 +10,7 @@
|
|
Sergio Pascual |
3bd41f7 |
from abc import ABCMeta, abstractmethod
|
|
Sergio Pascual |
3bd41f7 |
import warnings
|
|
Sergio Pascual |
3bd41f7 |
|
|
Sergio Pascual |
3bd41f7 |
-from ..externals.joblib import Parallel, delayed
|
|
Sergio Pascual |
3bd41f7 |
+from joblib import Parallel, delayed
|
|
Sergio Pascual |
3bd41f7 |
|
|
Sergio Pascual |
3bd41f7 |
from .base import LinearClassifierMixin, SparseCoefMixin
|
|
Sergio Pascual |
3bd41f7 |
from ..base import BaseEstimator, RegressorMixin
|
|
Sergio Pascual |
3bd41f7 |
diff -ur scikit-learn-0.14.1/sklearn/manifold/mds.py scikit-learn-0.14.1.joblib/sklearn/manifold/mds.py
|
|
Sergio Pascual |
3bd41f7 |
--- scikit-learn-0.14.1/sklearn/manifold/mds.py 2013-09-06 19:12:44.987338267 +0200
|
|
Sergio Pascual |
3bd41f7 |
+++ scikit-learn-0.14.1.joblib/sklearn/manifold/mds.py 2013-09-06 19:09:44.293855542 +0200
|
|
Sergio Pascual |
3bd41f7 |
@@ -12,8 +12,8 @@
|
|
Sergio Pascual |
3bd41f7 |
from ..base import BaseEstimator
|
|
Sergio Pascual |
3bd41f7 |
from ..metrics import euclidean_distances
|
|
Sergio Pascual |
3bd41f7 |
from ..utils import check_random_state, check_arrays
|
|
Sergio Pascual |
3bd41f7 |
-from ..externals.joblib import Parallel
|
|
Sergio Pascual |
3bd41f7 |
-from ..externals.joblib import delayed
|
|
Sergio Pascual |
3bd41f7 |
+from joblib import Parallel
|
|
Sergio Pascual |
3bd41f7 |
+from joblib import delayed
|
|
Sergio Pascual |
3bd41f7 |
from ..isotonic import IsotonicRegression
|
|
Sergio Pascual |
3bd41f7 |
|
|
Sergio Pascual |
3bd41f7 |
|
|
Sergio Pascual |
3bd41f7 |
diff -ur scikit-learn-0.14.1/sklearn/metrics/pairwise.py scikit-learn-0.14.1.joblib/sklearn/metrics/pairwise.py
|
|
Sergio Pascual |
3bd41f7 |
--- scikit-learn-0.14.1/sklearn/metrics/pairwise.py 2013-09-06 19:12:44.865337264 +0200
|
|
Sergio Pascual |
3bd41f7 |
+++ scikit-learn-0.14.1.joblib/sklearn/metrics/pairwise.py 2013-09-06 19:09:41.312831146 +0200
|
|
Sergio Pascual |
3bd41f7 |
@@ -45,9 +45,9 @@
|
|
Sergio Pascual |
3bd41f7 |
from ..utils import gen_even_slices
|
|
Sergio Pascual |
3bd41f7 |
from ..utils.extmath import safe_sparse_dot
|
|
Sergio Pascual |
3bd41f7 |
from ..preprocessing import normalize
|
|
Sergio Pascual |
3bd41f7 |
-from ..externals.joblib import Parallel
|
|
Sergio Pascual |
3bd41f7 |
-from ..externals.joblib import delayed
|
|
Sergio Pascual |
3bd41f7 |
-from ..externals.joblib.parallel import cpu_count
|
|
Sergio Pascual |
3bd41f7 |
+from joblib import Parallel
|
|
Sergio Pascual |
3bd41f7 |
+from joblib import delayed
|
|
Sergio Pascual |
3bd41f7 |
+from joblib.parallel import cpu_count
|
|
Sergio Pascual |
3bd41f7 |
|
|
Sergio Pascual |
3bd41f7 |
from .pairwise_fast import _chi2_kernel_fast
|
|
Sergio Pascual |
3bd41f7 |
|
|
Sergio Pascual |
3bd41f7 |
diff -ur scikit-learn-0.14.1/sklearn/multiclass.py scikit-learn-0.14.1.joblib/sklearn/multiclass.py
|
|
Sergio Pascual |
3bd41f7 |
--- scikit-learn-0.14.1/sklearn/multiclass.py 2013-09-06 19:12:44.911337642 +0200
|
|
Sergio Pascual |
3bd41f7 |
+++ scikit-learn-0.14.1.joblib/sklearn/multiclass.py 2013-09-06 19:09:42.310839314 +0200
|
|
Sergio Pascual |
3bd41f7 |
@@ -40,8 +40,8 @@
|
|
Sergio Pascual |
3bd41f7 |
from .preprocessing import LabelBinarizer
|
|
Sergio Pascual |
3bd41f7 |
from .metrics.pairwise import euclidean_distances
|
|
Sergio Pascual |
3bd41f7 |
from .utils import check_random_state
|
|
Sergio Pascual |
3bd41f7 |
-from .externals.joblib import Parallel
|
|
Sergio Pascual |
3bd41f7 |
-from .externals.joblib import delayed
|
|
Sergio Pascual |
3bd41f7 |
+from joblib import Parallel
|
|
Sergio Pascual |
3bd41f7 |
+from joblib import delayed
|
|
Sergio Pascual |
3bd41f7 |
|
|
Sergio Pascual |
3bd41f7 |
|
|
Sergio Pascual |
3bd41f7 |
def _fit_binary(estimator, X, y, classes=None):
|
|
Sergio Pascual |
3bd41f7 |
diff -ur scikit-learn-0.14.1/sklearn/pipeline.py scikit-learn-0.14.1.joblib/sklearn/pipeline.py
|
|
Sergio Pascual |
3bd41f7 |
--- scikit-learn-0.14.1/sklearn/pipeline.py 2013-09-06 19:12:44.918337699 +0200
|
|
Sergio Pascual |
3bd41f7 |
+++ scikit-learn-0.14.1.joblib/sklearn/pipeline.py 2013-09-06 19:09:42.522841049 +0200
|
|
Sergio Pascual |
3bd41f7 |
@@ -12,7 +12,7 @@
|
|
Sergio Pascual |
3bd41f7 |
from scipy import sparse
|
|
Sergio Pascual |
3bd41f7 |
|
|
Sergio Pascual |
3bd41f7 |
from .base import BaseEstimator, TransformerMixin
|
|
Sergio Pascual |
3bd41f7 |
-from .externals.joblib import Parallel, delayed
|
|
Sergio Pascual |
3bd41f7 |
+from joblib import Parallel, delayed
|
|
Sergio Pascual |
3bd41f7 |
from .externals import six
|
|
Sergio Pascual |
3bd41f7 |
from .utils import tosequence
|
|
Sergio Pascual |
3bd41f7 |
from .externals.six import iteritems
|