8000 Merge tag '0.19b2' into releases · yarikoptic/scikit-learn@ec9e5de · GitHub
[go: up one dir, main page]

Skip to content

Commit ec9e5de

Browse files
committed
Merge tag '0.19b2' into releases
Release 0.19b2 * tag '0.19b2': (808 commits) Preparing 0.19b2 [MRG+1] FIX out of bounds array access in SAGA (scikit-learn#9376) FIX make test_importances pass on 32 bit linux Release 0.19b1 DOC remove 'in dev' header in whats_new.rst DOC typos in whats_news.rst [ci skip] [MRG] DOC cleaning up what's new for 0.19 (scikit-learn#9252) FIX t-SNE memory usage and many other optimizer issues (scikit-learn#9032) FIX broken link in gallery and bad title rendering [MRG] DOC Replace \acute by prime (scikit-learn#9332) Fix typos (scikit-learn#9320) [MRG + 1 (rv) + 1 (alex) + 1] Add a check to test the docstring params and their order (scikit-learn#9206) DOC Residual sum vs. regression sum (scikit-learn#9314) [MRG] [HOTFIX] Fix capitalization in test and hence fix failing travis at master (scikit-learn#9317) More informative error message for classification metrics given regression output (scikit-learn#9275) [MRG] COSMIT Remove unused parameters in private functions (scikit-learn#9310) [MRG+1] Ridgecv normalize (scikit-learn#9302) [MRG + 2] ENH Allow `cross_val_score`, `GridSearchCV` et al. to evaluate on multiple metrics (scikit-learn#7388) Add data_home parameter to fetch_kddcup99 (scikit-learn#9289) FIX makedirs(..., exists_ok) not available in Python 2 (scikit-learn#9284) ...
2 parents f558cc9 + 83816c2 commit ec9e5de

File tree

618 files changed

+29257
-17208
lines changed

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
comment: off
2+
3+
coverage:
4+
status:
5+
project:
6+
default:
7+
# Commits pushed to master should not make the overall
8+
# project coverage decrease by more than 1%:
9+
target: auto
10+
threshold: 1%
11+
patch:
12+
default:
13+
# Be tolerant on slight code coverage diff on PRs to limit
14+
# noisy red coverage status on github PRs.
15+
# Note The coverage stats are still uploaded
16+
# to codecov so that PR reviewers can see uncovered lines
17+
# in the github diff if they install the codecov browser
18+
# extension:
19+
# https://github.com/codecov/browser-extension
20+
target: auto
21+
threshold: 1%
22+
Original file line numberDiff line numberDiff line change
@@ -1,30 +1 @@
1-
/sklearn/__check_build/_check_build.c -diff
2-
/sklearn/_isotonic.c -diff
3-
/sklearn/cluster/_dbscan_inner.cpp -diff
4-
/sklearn/cluster/_hierarchical.cpp -diff
5-
/sklearn/cluster/_k_means.c -diff
6-
/sklearn/cluster/_k_means_elkan.c -diff
7-
/sklearn/datasets/_svmlight_format.c -diff
8-
/sklearn/decomposition/_online_lda.c -diff
9-
/sklearn/decomposition/cdnmf_fast.c -diff
10-
/sklearn/ensemble/_gradient_boosting.c -diff
11-
/sklearn/feature_extraction/_hashing.c -diff
12-
/sklearn/linear_model/cd_fast.c -diff
13-
/sklearn/linear_model/sgd_fast.c -diff
14-
/sklearn/linear_model/sag_fast.c -diff
15-
/sklearn/metrics/pairwise_fast.c -diff
16-
/sklearn/neighbors/ball_tree.c -diff
17-
/sklearn/neighbors/kd_tree.c -diff
18-
/sklearn/svm/liblinear.c -diff
19-
/sklearn/svm/libsvm.c -diff
20-
/sklearn/svm/libsvm_sparse.c -diff
21-
/sklearn/tree/_tree.c -diff
22-
/sklearn/tree/_utils.c -diff
23-
/sklearn/utils/arrayfuncs.c -diff
24-
/sklearn/utils/graph_shortest_path.c -diff
25-
/sklearn/utils/lgamma.c -diff
26-
/sklearn/utils/_logistic_sigmoid.c -diff
27-
/sklearn/utils/murmurhash.c -diff
28-
/sklearn/utils/seq_dataset.c -diff
29-
/sklearn/utils/sparsefuncs_fast.c -diff
30-
/sklearn/utils/weight_vector.c -diff
1+
/doc/whats_new.rst merge=union
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ scikit_learn.egg-info/
2323
.coverage
2424
coverage
2525
*.py,cover
26-
.tags
26+
.tags*
2727
tags
2828
covtype.data.gz
2929
20news-18828/
@@ -55,11 +55,13 @@ benchmarks/bench_covertype_data/
5555
.pydevproject
5656
.idea
5757

58-
cythonize.dat
5958
*.c
6059
*.cpp
6160

6261
!*/src/*.c
6362
!*/src/*.cpp
6463
*.sln
6564
*.pyproj
65+
66+
# Used by py.test
67+
.cache
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ Brian Holt <bh00038@cvplws63.eps.surrey.ac.uk> <bdholt1@gmail.com>
2323
Christian Osendorfer <osendorf@gmail.com>
2424
Clay Woolam <clay@woolam.org>
2525
Danny Sullivan <dsullivan7@hotmail.com> <dbsullivan23@gmail.com>
26-
Denis Engemann <d.engemann@fz-juelich.de>
27-
Denis Engemann <d.engemann@fz-juelich.de> <denis.engemann@gmail.com>
28-
Denis Engemann <d.engemann@fz-juelich.de> <dengemann@Deniss-MacBook-Pro.local>
29-
Denis Engemann <d.engemann@fz-juelich.de> <dengemann <denis.engemann@gmail.com>
26+
Denis Engemann <denis-alexander.engemann@inria.fr>
27+
Denis Engemann <denis-alexander.engemann@inria.fr> <denis.engemann@gmail.com>
28+
Denis Engemann <denis-alexander.engemann@inria.fr> <dengemann@Deniss-MacBook-Pro.local>
29+
Denis Engemann <denis-alexander.engemann@inria.fr> <dengemann <denis.engemann@gmail.com>
3030
Diego Molla <dmollaaliod@gmail.com> <diego@diego-desktop.(none)>
3131
DraXus <draxus@gmail.com> draxus <draxus@hammer.ugr>
3232
Edouard DUCHESNAY <ed203246@is206877.intra.cea.fr> <duchesnay@is143433.(none)>
@@ -61,7 +61,7 @@ Jake VanderPlas <vanderplas@astro.washington.edu> <jakevdp@gmail.com>
6161
Jake VanderPlas <vanderplas@astro.washington.edu> <vanderplas@astro.washington.edu>
6262
James Bergstra <james.bergstra@gmail.com>
6363
Jaques Grobler <jaques.grobler@inria.fr> <jaquesgrobler@gmail.com>
64-
Jan Schl�ter <scikit-learn@jan-schlueter.de>
64+
Jan Schlüter <scikit-learn@jan-schlueter.de>
6565
Jean Kossaifi <jean.kossaifi@gmail.com>
6666
Jean Kossaifi <jean.kossaifi@gmail.com> <jkossaifi@is208616.intra.cea.fr>
6767
Jean Kossaifi <jean.kossaifi@gmail.com> <kossaifi@is208616.intra.cea.fr>
@@ -93,7 +93,8 @@ Olivier Grisel <olivier.grisel@ensta.org> <olivier.grisel@ensta.org>
9393
Olivier Hervieu <olivier.hervieu@gmail.com> <olivier.hervieu@tinyclues.com>
9494
Paul Butler <paulgb@gmail.com>
9595
Peter Prettenhofer <peter.prettenhofer@gmail.com>
96-
Raghav R V <rvraghav93@gmail.com>
96+
Raghav RV <rvraghav93@gmail.com>
97+
Raghav RV <rvraghav93@gmail.com> <ragvrv@gmail.com>
9798
Robert Layton <robertlayton@gmail.com>
9899
Roman Sinayev <roman.sinayev@gmail.com>
99100
Roman Sinayev <roman.sinayev@gmail.com> <roman@y570.(none)>
Original file line numberDiff line numberDiff line change
@@ -3,63 +3,62 @@ sudo: false
33

44
language: python
55

6-
# Pre-install packages for the ubuntu distribution
76
cache:
87
apt: true
98
directories:
109
- $HOME/.cache/pip
11-
- $HOME/download
12-
addons:
13-
apt:
14-
packages:
15-
- libatlas3gf-base
16-
- libatlas-dev
17-
# only required by the DISTRIB="ubuntu" build:
18-
- python-scipy
10+
- $HOME/.ccache
11+
12+
dist: trusty
1913

2014
env:
2115
global:
2216
# Directory where tests are run from
2317
- TEST_DIR=/tmp/sklearn
2418
- OMP_NUM_THREADS=4
2519
- OPENBLAS_NUM_THREADS=4
26-
matrix:
27-
# This environment tests that scikit-learn can be built against
28-
# versions of numpy, scipy with ATLAS that comes with Ubuntu Precise 12.04
29-
- DISTRIB="ubuntu" PYTHON_VERSION="2.7" CYTHON_VERSION="0.23.4"
30-
COVERAGE=true
31-
# This environment tests the oldest supported anaconda env
32-
- DISTRIB="conda" PYTHON_VERSION="2.6" INSTALL_MKL="false"
33-
NUMPY_VERSION="1.6.2" SCIPY_VERSION="0.11.0" CYTHON_VERSION="0.23"
34-
# This environment tests the newest supported anaconda env
35-
- DISTRIB="conda" PYTHON_VERSION="3.5" INSTALL_MKL="true"
36-
NUMPY_VERSION="1.10.4" SCIPY_VERSION="0.17.0" PANDAS_VERSION="0.18.0"
37-
CYTHON_VERSION="0.23.4"
38-
# flake8 linting on diff wrt common ancestor with upstream/master
39-
- RUN_FLAKE8="true" SKIP_TESTS="true"
40-
DISTRIB="conda" PYTHON_VERSION="3.5" INSTALL_MKL="true"
41-
NUMPY_VERSION="1.10.4" SCIPY_VERSION="0.17.0" CYTHON_VERSION="0.23.4"
42-
4320

4421
matrix:
45-
allow_failures:
46-
# allow_failures seems to be keyed on the python version
47-
# We are using this to allow failures for DISTRIB=scipy-dev-wheels
48-
- python: 3.5
49-
5022
include:
23+
# This environment tests that scikit-learn can be built against
24+
# versions of numpy, scipy with ATLAS that comes with Ubuntu Trusty 14.04
25+
- env: DISTRIB="ubuntu" PYTHON_VERSION="2.7" CYTHON_VERSION="0.23.4"
26+
COVERAGE=true
27+
addons:
28+
apt:
29+
packages:
30+
# these only required by the DISTRIB="ubuntu" builds:
31+
- python-scipy
32+
- libatlas3gf-base
33+
- libatlas-dev
34+
# This environment tests the oldest supported anaconda env
35+
- env: DISTRIB="conda" PYTHON_VERSION="2.7" INSTALL_MKL="false"
36+
NUMPY_VERSION="1.8.2" SCIPY_VERSION="0.13.3" CYTHON_VERSION="0.23.5"
37+
COVERAGE=true
38+
# This environment tests the newest supported Anaconda release (4.4.0)
39+
# It also runs tests requiring Pandas.
40+
- env: DISTRIB="conda" PYTHON_VERSION="3.6.1" INSTALL_MKL="true"
41+
NUMPY_VERSION="1.12.1" SCIPY_VERSION="0.19.0" PANDAS_VERSION="0.20.1"
42+
CYTHON_VERSION="0.25.2" COVERAGE=true
43+
# This environment use pytest to run the tests. It uses the newest
44+
# supported Anaconda release (4.4.0). It also runs tests requiring Pandas.
45+
- env: USE_PYTEST="true" DISTRIB="conda" PYTHON_VERSION="3.6.1"
46+
INSTALL_MKL="true" NUMPY_VERSION="1.12.1" SCIPY_VERSION="0.19.0"
47+
PANDAS_VERSION="0.20.1" CYTHON_VERSION="0.25.2"
48+
# flake8 linting on diff wrt common ancestor with upstream/master
49+
- env: RUN_FLAKE8="true" SKIP_TESTS="true"
50+
DISTRIB="conda" PYTHON_VERSION="3.5" INSTALL_MKL="true"
51+
NUMPY_VERSION="1.12.1" SCIPY_VERSION="0.19.0" CYTHON_VERSION="0.23.5"
52+
TEST_DOCSTRINGS="true"
5153
# This environment tests scikit-learn against numpy and scipy master
5254
# installed from their CI wheels in a virtualenv with the Python
5355
# interpreter provided by travis.
54-
# Note: libatlas3gf-base is not allowed yet so we need 'sudo':
55-
# https://github.com/travis-ci/apt-package-whitelist/issues/2407
56-
# Once libatlas3gf-base is on the whitelist it will be possible to replace
57-
# the before_install step with and addons/apt/packages declaration.
5856
- python: 3.5
5957
env: DISTRIB="scipy-dev-wheels"
60-
sudo: True
61-
before_install: sudo apt-get install -yqq libatlas3gf-base libatlas-dev
62-
58+
allow_failures:
59+
# allow_failures seems to be keyed on the python version
60+
# We are using this to allow failures for DISTRIB=scipy-dev-wheels
61+
- python: 3.5
6362

6463
install: source build_tools/travis/install.sh
6564
script: bash build_tools/travis/test_script.sh
Original file line numberDiff line numberDiff line change
@@ -67,5 +67,5 @@ The following people have been core contributors to scikit-learn's development a
6767

6868
Please do not email the authors directly to ask for assistance or report issues.
6969
Instead, please see `What's the best way to ask questions about scikit-learn
70-
<http://scikit-learn.org/stable/faq.html#what-s-the-best-way-to-ask-questions-about-scikit-learn>`_
70+
<http://scikit-learn.org/stable/faq.html#what-s-the-best-way-to-get-help-on-scikit-learn-usage>`_
7171
in the FAQ.
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,36 @@ Contributing to scikit-learn
44

55
**Note: This document is a 'getting started' summary for contributing code,
66
documentation, testing, and filing issues.** Visit the [**Contributing
7-
page**](http://scikit-learn.org/stable/developers/index.html)
7+
page**](http://scikit-learn.org/stable/developers/contributing.html)
88
for the full contributor's guide. Please read it carefully to help make
99
the code review process go as smoothly as possible and maximize the
10-
likelihood of your contribution being merged.**
10+
likelihood of your contribution being merged.
1111

1212
How to contribute
1313
-----------------
1414

15-
The preferred workflow for contributing to scikit-learn is to fork the
15+
The preferred workflow for contributing to scikit-learn is to fork the
1616
[main repository](https://github.com/scikit-learn/scikit-learn) on
1717
GitHub, clone, and develop on a branch. Steps:
1818

1919
1. Fork the [project repository](https://github.com/scikit-learn/scikit-learn)
2020
by clicking on the 'Fork' button near the top right of the page. This creates
21-
a copy of the code under your GitHub user account.
21+
a copy of the code under your GitHub user account. For more details on
22+
how to fork a repository see [this guide](https://help.github.com/articles/fork-a-repo/).
2223

2324
2. Clone your fork of the scikit-learn repo from your GitHub account to your local disk:
2425

2526
```bash
2627
$ git clone git@github.com:YourLogin/scikit-learn.git
2728
$ cd scikit-learn
2829
```
29-
30+
3031
3. Create a ``feature`` branch to hold your development changes:
3132

3233
```bash
3334
$ git checkout -b my-feature
3435
```
35-
36+
3637
Always use a ``feature`` branch. It's good practice to never work on the ``master`` branch!
3738

3839
4. Develop the feature on your feature branch. Add changed files using ``git add`` and then ``git commit`` files:
@@ -48,11 +49,10 @@ GitHub, clone, and develop on a branch. Steps:
4849
$ git push -u origin my-feature
4950
```
5051

51-
5. Go to the GitHub web page of your fork of the scikit-learn repo.
52-
Click the 'Pull request' button to send your changes to the project's maintainers for
53-
review. This will send an email to the committers.
52+
5. Follow [these instructions](https://help.github.com/articles/creating-a-pull-request-from-a-fork)
53+
to create a pull request from your fork. This will send an email to the committers.
5454

55-
(If any of the above seems like magic to you, please look up the
55+
(If any of the above seems like magic to you, please look up the
5656
[Git documentation](https://git-scm.com/documentation) on the web, or ask a friend or another contributor for help.)
5757

5858
Pull Request Checklist
@@ -79,7 +79,10 @@ following rules before you submit a pull request:
7979

8080
- Please prefix the title of your pull request with `[MRG]` (Ready for
8181
Merge), if the contribution is complete and ready for a detailed review.
82-
Incomplete contributions should be prefixed `[WIP]` (to indicate a work
82+
Two core developers will review your code and change the prefix of the pull
83+
request to `[MRG + 1]` and `[MRG + 2]` on approval, making it eligible
84+
for merging. An incomplete contribution -- where you expect to do more work before
85+
receiving a full review -- should be prefixed `[WIP]` (to indicate a work
8386
in progress) and changed to `[MRG]` when it matures. WIPs may be useful
8487
to: indicate you are working on something to avoid duplicated work,
8588
request broad review of functionality or API, or seek collaborators.
@@ -100,8 +103,15 @@ following rules before you submit a pull request:
100103
functionality is useful in practice and, if possible, compare it
101104
to other methods available in scikit-learn.
102105

103-
- Documentation and high-coverage tests are necessary for enhancements
104-
to be accepted.
106+
- Documentation and high-coverage tests are necessary for enhancements to be
107+
accepted. Bug-fixes or new features should be provided with
108+
[non-regression tests](https://en.wikipedia.org/wiki/Non-regression_testing).
109+
These tests verify the correct behavior of the fix or feature. In this
110+
manner, further modifications on the code base are granted to be consistent
111+
with the desired behavior.
112+
For the Bug-fixes case, at the time of the PR, this tests should fail for
113+
the code base in master and pass for the PR code.
114+
105115

106116
- At least one paragraph of narrative documentation with links to
107117
references in the literature (with PDF links when possible) and
@@ -170,7 +180,7 @@ following rules before submitting:
170180

171181
- Please include your operating system type and version number, as well
172182
as your Python, scikit-learn, numpy, and scipy versions. This information
173-
can be found by runnning the following code snippet:
183+
can be found by running the following code snippet:
174184

175185
```python
176186
import platform; print(platform.platform())
@@ -179,7 +189,7 @@ following rules before submitting:
179189
import scipy; print("SciPy", scipy.__version__)
180190
import sklearn; print("Scikit-Learn", sklearn.__version__)
181191
```
182-
192+
183193
- Please be specific about what estimators and/or functions are involved
184194
and the shape of the data, as appropriate; please include a
185195
[reproducible](http://stackoverflow.com/help/mcve) code snippet
@@ -214,7 +224,7 @@ be placed in ``_build/html/`` and are viewable in a web browser. See the
214224

215225
For building the documentation, you will need
216226
[sphinx](http://sphinx.pocoo.org/),
217-
[matplotlib](http://matplotlib.sourceforge.net/), and
227+
[matplotlib](http://matplotlib.org/), and
218228
[pillow](http://pillow.readthedocs.io/en/latest/).
219229

220230
When you are writing documentation, it is important to keep a good
@@ -228,5 +238,5 @@ Further Information
228238
-------------------
229239

230240
Visit the [Contributing Code](http://scikit-learn.org/stable/developers/index.html#coding-guidelines)
231-
section of the website for more information including conforming to the
241+
section of the website for more information including conforming to the
232242
API spec and profiling contributed code.
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
New BSD License
22

3-
Copyright (c) 2007–2016 The scikit-learn developers.
3+
Copyright (c) 2007–2017 The scikit-learn developers.
44
All rights reserved.
55

66

Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ For more information, see User Questions: http://scikit-learn.org/stable/support
1313
#### Steps/Code to Reproduce
1414
<!--
1515
Example:
16-
```
16+
```python
1717
from sklearn.feature_extraction.text import CountVectorizer
1818
from sklearn.decomposition import LatentDirichletAllocation
1919
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,6 @@ clean: clean-ctags
2626

2727
in: inplace # just a shortcut
2828
inplace:
29-
# to avoid errors in 0.15 upgrade
30-
rm -f sklearn/utils/sparsefuncs*.so
31-
rm -f sklearn/utils/random*.so
3229
$(PYTHON) setup.py build_ext -i
3330

3431
test-code: in
@@ -52,7 +49,7 @@ trailing-spaces:
5249
find sklearn -name "*.py" -exec perl -pi -e 's/[ \t]*$$//' {} \;
5350

5451
cython:
55-
python build_tools/cythonize.py sklearn
52+
python setup.py build_src
5653

5754
ctags:
5855
# make tags for symbol based navigation in emacs and vim