8000 Merge branch 'master' into logistic_default · scikit-learn/scikit-learn@25f343d · GitHub
[go: up one dir, main page]

Skip to content

Commit 25f343d

Browse files
committed
Merge branch 'master' into logistic_default
2 parents 83a5dec + b3c177c commit 25f343d

File tree

326 files changed

+10030
-3580
lines changed

Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ jobs:
6565
path: ~/log.txt
6666
destination: log.txt
6767

68+
6869
deploy:
6970
docker:
7071
- image: circleci/python:3.6.1
@@ -91,4 +92,3 @@ workflows:
9192
- deploy:
9293
requires:
9394
- python3
94-
- python2

Original file line numberDiff line numberDiff line change
@@ -38,13 +38,15 @@ matrix:
3838
NUMPY_VERSION="1.10.4" SCIPY_VERSION="0.16.1" CYTHON_VERSION="0.25.2"
3939
PILLOW_VERSION="4.0.0" COVERAGE=true
4040
if: type != cron
41-
# This environment tests the newest supported Anaconda release (5.0.0)
42-
# It also runs tests requiring Pandas and PyAMG
41+
# This environment tests the newest supported Anaconda release.
42+
# It runs tests requiring pandas and PyAMG.
43+
# It also runs with the site joblib instead of the vendored copy of joblib.
4344
- env: DISTRIB="conda" PYTHON_VERSION="3.6.2" INSTALL_MKL="true"
4445
NUMPY_VERSION="1.14.2" SCIPY_VERSION="1.0.0" PANDAS_VERSION="0.20.3"
4546
CYTHON_VERSION="0.26.1" PYAMG_VERSION="3.3.2" PILLOW_VERSION="4.3.0"
46-
COVERAGE=true
47+
JOBLIB_VERSION="0.12" COVERAGE=true
4748
CHECK_PYTEST_SOFT_DEPENDENCY="true" TEST_DOCSTRINGS="true"
49+
SKLEARN_SITE_JOBLIB=1
4850
if: type != cron
4951
# flake8 linting on diff wrt common ancestor with upstream/master
5052
- env: RUN_FLAKE8="true" SKIP_TESTS="true"

Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ The following people have been core contributors to scikit-learn's development a
4747
* `Kyle Kastner <http://kastnerkyle.github.io>`_
4848
* `Manoj Kumar <https://manojbits.wordpress.com>`_
4949
* Robert Layton
50+
* `Guillaume Lemaitre <https://github.com/glemaitre>`_
5051
* `Wei Li <http://kuantkid.github.io/>`_
5152
* Paolo Losi
5253
* `Gilles Louppe <http://glouppe.github.io/>`_
@@ -59,11 +60,14 @@ The following people have been core contributors to scikit-learn's development a
5960
* `Alexandre Passos <http://atpassos.posterous.com>`_
6061
* `Fabian Pedregosa <http://fa.bianp.net/blog/>`_
6162
* `Peter Prettenhofer <https://sites.google.com/site/peterprettenhofer/>`_
63+
* `Hanmin Qin <https://github.com/qinhanmin2014>`_
6264
* Bertrand Thirion
65+
* `Joris Van den Bossche <https://github.com/jorisvandenbossche>`_
6366
* `Jake VanderPlas <http://staff.washington.edu/jakevdp/>`_
6467
* Nelle Varoquaux
6568
* `Gael Varoquaux <http://gael-varoquaux.info/>`_
6669
* Ron Weiss
70+
* `Roman Yurchak <https://github.com/rth>`_
6771

6872
Please do not email the authors directly to ask for assistance or report issues.
6973
Instead, please see `What's the best way to ask questions about scikit-learn

Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ scikit-learn requires:
5353
- NumPy (>= 1.8.2)
5454
- SciPy (>= 0.13.3)
5555

56+
**Scikit-learn 0.20 is the last version to support Python2.7.**
57+
Scikit-learn 0.21 and later will require Python 3.5 or newer.
58+
5659
For running the examples Matplotlib >= 1.3.1 is required. A few examples
5760
require scikit-image >= 0.9.3 and a few examples require pandas >= 0.13.1.
5861

Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@ environment:
1717
SKLEARN_SKIP_NETWORK_TESTS: 1
1818

1919
matrix:
20-
- PYTHON: "C:\\Python37"
21-
PYTHON_VERSION: "3.7.0"
22-
PYTHON_ARCH: "32"
23-
2420
- PYTHON: "C:\\Python37-x64"
2521
PYTHON_VERSION: "3.7.0"
2622
PYTHON_ARCH: "64"
@@ -29,10 +25,6 @@ environment:
2925
PYTHON_VERSION: "2.7.8"
3026
PYTHON_ARCH: "32"
3127

32-
- PYTHON: "C:\\Python27-x64"
33-
PYTHON_VERSION: "2.7.8"
34-
PYTHON_ARCH: "64"
35-
3628

3729
# Because we only have a single worker, we don't want to waste precious
3830
# appveyor CI time and make other PRs wait for repeated failures in a failing
@@ -49,7 +41,7 @@ install:
4941
# directly to master instead of just PR builds.
5042
# credits: JuliaLang developers.
5143
- ps: if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod `
52-
https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | `
44+
https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=500).builds | `
5345
Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { `
5446
throw "There are newer queued builds for this pull request, failing early." }
5547

Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
from sklearn.ensemble import RandomForestClassifier, ExtraTreesClassifier
6060
from sklearn.ensemble import GradientBoostingClassifier
6161
from sklearn.metrics import zero_one_loss
62-
from sklearn.externals.joblib import Memory
62+
from sklearn.utils import Memory
6363
from sklearn.utils import check_array
6464

6565
# Memoize the data extraction and memory map the resulting

Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@ def print_outlier_ratio(y):
119119
y_test = y[n_samples_train:]
120120

121121
print('--- Fitting the IsolationForest estimator...')
122-
model = IsolationForest(n_jobs=-1, random_state=random_state)
122+
model = IsolationForest(behaviour='new', n_jobs=-1,
123+
random_state=random_state)
123124
tstart = time()
124125
model.fit(X_train)
125126
fit_time = time() - tstart

Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
from sklearn.ensemble import ExtraTreesClassifier
4242
from sklearn.ensemble import RandomForestClassifier
4343
from sklearn.dummy import DummyClassifier
44-
from sklearn.externals.joblib import Memory
44+
from sklearn.utils import Memory
4545
from sklearn.kernel_approximation import Nystroem
4646
from sklearn.kernel_approximation import RBFSampler
4747
from sklearn.metrics import zero_one_loss

Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
from sklearn.decomposition.nmf import _initialize_nmf
2323
from sklearn.decomposition.nmf import _beta_divergence
2424
from sklearn.decomposition.nmf import INTEGER_TYPES, _check_init
25-
from sklearn.externals.joblib import Memory
25+
from sklearn.utils import Memory
2626
from sklearn.exceptions import ConvergenceWarning
2727
from sklearn.utils.extmath import safe_sparse_dot, squared_norm
2828
from sklearn.utils import check_array

Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import gc
99
import time
1010

11-
from sklearn.externals.joblib import Memory
11+
from sklearn.utils import Memory
1212
from sklearn.linear_model import (LogisticRegression, SGDClassifier)
1313
from sklearn.datasets import fetch_rcv1
1414
from sklearn.linear_model.sag import get_auto_step_size