Commit Graph

2966 Commits

Author SHA1 Message Date
Hanmin Qin c0bb178389 EXA: fix xlabel and ylabel in plot_cv_digits.py (#13067) 2019-01-30 15:41:37 +01:00
Hanmin Qin 1deb95a13e EXA Improve example plot_svm_anova.py (#11731) 2019-01-28 12:57:38 +11:00
Joel Nothman 8e4a8763ce MNT Remove accidentally added example 2019-01-18 00:41:10 +11:00
Joel Nothman 486f8fc543 DOC fix plot_iris references after files renamed 2019-01-17 23:31:48 +11:00
Joel Nothman 1a54989ce8 DOC credit multiple authors of new example 2019-01-17 22:19:19 +11:00
Christos Aridas d2a77d7e78 DOC Add an example of inductive clustering (#10852) 2019-01-17 22:16:22 +11:00
Adrin Jalali 69c8967e21 DOC Fix warnings in examples (#12654)
Fixe or suppresses many warnings in examples, including matplotlib complaining about the non-gui backend.
2019-01-17 21:41:13 +11:00
Thomas Fan 7bc20c0e50 DOC Minor changes to DOCS to address sphinx warnings (#12999) 2019-01-17 17:49:31 +08:00
Zhuyi Xue ba4720a01d DOC improved example plot in plot_lda_qda.py (#12942) 2019-01-14 23:15:19 +08:00
Rüdiger Busche d300f406ae MAINT Simplify super() calls (#12812) 2019-01-10 22:27:06 +01:00
mferrari3 354c8c3bc3 DOC update SVR plot point size and color (#12877)
With thanks to 	@rishikksh20 and @ml4713
2019-01-10 09:42:35 +11:00
Wenhao Zhang 581752012c ENH refit=callable in *SearchCV adds flexibility in identifying the best estimator (#11354) 2019-01-09 12:56:30 +11:00
Rohan Lekhwani e0697b01a7 MNT Used scipy.special.expit for the inverse of the logit function (#12931) 2019-01-08 18:35:19 +11:00
Roman Yurchak acb8106472 MNT Use list and dict comprehension (#12668) 2019-01-08 09:32:34 +11:00
Hanmin Qin 9acc606e60 EXA Use cv=5 instead of cv=10 in plot_validation_curve.py (#12929) 2019-01-07 15:21:42 +01:00
Mickaël Schoentgen 2df594564d EXA Fix several DeprecationWarning: invalid escape sequence in examples (#12924) 2019-01-05 12:22:36 +08:00
Andreas Mueller 952ef6637a MRG Drop legacy python / remove six dependencies (#12639) 2019-01-03 15:50:05 +02:00
Adrin Jalali 77b9b1f114 BLD circle-ci should only run/build plot_* files (#12797) 2018-12-28 19:48:45 +08:00
Nicolas Hug a50c03f975 [MRG] Add pprint for estimators - continued (#11705)
* add pprint for estimators

* strip color from length, add color option

* Minor cleaning, fixes, factoring and docs

* Added some basic tests

* Fixed line length issue

* fixed flake8 and added visual test for review

* Fixed test

* Fixed Python 2 issues (inspect.signature import)

* Trying to fix flake8 again

* Added special repr for functions

* Added some other visual tests

* Changed _format_function in to _format_callable

because callable() returns True also for class objects (which we want to
reprensent with their name as well anyway)

* Consistent output in Python 2 and 3

* WIP

* Now using the builtin pprint module

* pep8

* Added changed_only param

* Fixed printing when string would fit in less than line width

* Fixed printing of steps parameter

* Fixed changed_only param for short estimators

* fixed pep8

* Added some more description in docstring

* changed_only is now an option from set_config()

* Put _pprint.py into sklearn/utils, added tests

* Added doctest NORMALIZE_WHITESPACE where needed

* Fixed tests

* fix test-doc

* fixing test that passed before....

* Fixed tests

* Added test for changed_only and long lines

* typo

* Added authors names

* Added license file

* Added ellipsis based on number of elements in sequence + added increasinly aggressive repr strategies

* Updated whatsnew

* dont use increaingly aggressive strategy

* Fixed tests

* Removed LICENSE file and put license text in _pprint.py

* fixed test_base

* Sorted parameters dictionary for consistent output in 3.5

* Actually using OrderedDict...

* Addressed comments

* Added test for NaN changed parameter

* Update whatsnew

* Added example to set_config()

* Removed example

* Added example in gallery

* Spelling
2018-12-19 23:48:21 -05:00
Feda Curic 52e9cc5add EXA Avoiding TypeError when using --all_categories in plot_document_classification_20newsgroups.py (#12770) 2018-12-14 23:40:49 +08:00
Adrin Jalali 2bd87f6ed8 Remove python < 3.5 from CI (#12746) 2018-12-14 10:53:12 +01:00
Adrin Jalali f70b1ff3f7 EXA change normed to density in matplotlib calls in examples (#12718) 2018-12-06 09:05:41 +08:00
josephsalmon aa331eefb0 EXA improving examples/mixture/plot_gmm_covariances.py visualisation (#12683) 2018-11-27 21:07:38 +01:00
Hanmin Qin 9dfe8768c8 MNT Unused import 2018-11-24 23:38:38 +08:00
Loïc Estève e6e8345248 EXA remove unused variables. (#12647)
The data comes from static CSVs that cover 2003-01-01 to 2007-12-31.
2018-11-24 23:34:56 +08:00
Albert Thomas 96a804ba5d DOC Fix links in anomaly detection example (#12665) 2018-11-24 16:49:10 +08:00
Nicolas Hug c1f58745be [MRG] Add elastic net penalty to LogisticRegression (#11646)
* First draft on elasticnet penaly for LogisticRegression

* Some basic tests

* Doc update

* First draft for LogisticRegressionCV.

It seems to be working for binary classification and for multiclass when
multi_class='ovr'. I'm having a hard time figuring out the intricacies
of multi_class='multinomial'.

* Changed default to None for l1_ratio.

added warning message is user sets l1_ratio while penalty is not
elastic-net

* Some more doc

* Updated example to plot elastic net sparsity

* Fixed flake8

* Fixed test by not modifying attribute in fit

* Fixed doc issues

* WIP

* Partially fixed logistic_reg_CV for multinomial.

Also added some comments that are hopefully clear.
Still need to fix refit=False

* Fixed doc issue

* WIP

* Fixed test for refit=False in LogisticRegressionCV

* Fixed Python 2 numpy version issue

* minor doc updates

* Weird doc error...

* Added test to ensure that elastic net is at least as good as L1 or L2
once l1_ratio has been optimized with grid search

Also addressed minor reviews

* Fixed test

* addressed comments

* Added back ignore warning on tests

* Added a functional test

* Scale data in test... Now failing

* elastic-net --> elasticnet

* Updated doc for some attributes and checked their shape in tests

* Added l1_ratio dimension to coefs_paths and scores attr

* improve example + fix test

* FIX incorrect lagged_update in SAGA

* Add non-regression test for SAGA's bug

* FIX flake8 and warning

* Re fixed warning

* Updated some tests

* Addressed comments

* more comments and added dimension to LogisticRegressionCV.n_iter_ attribute

* Updated whatsnew for 0.21

* better doc shape looks

* Fixed whatnew entry after merges

* Added dot

* Addressed comments + standardized optional default param docstrings

* Addessed comments

* use swapaxes instead of unsupported moveaxis (hopefully fixes tests)
2018-11-21 20:23:57 -05:00
Thomas Moreau d25da1be20 FIX make joblib utils private, and remove mentions of externals.joblib (#12345) 2018-11-20 10:53:52 +11:00
Quentin Batista 4b78d7abf4 DOC: Clarify `cv` parameter description in `GridSearchCV` (#12495)
#### Reference Issues/PRs
<!--
Example: Fixes #1234. See also #3456.
Please use keywords (e.g., Fixes) to create link to the issues or pull requests
you resolved, so that they will automatically be closed when your pull request
is merged. See https://github.com/blog/1506-closing-issues-via-pull-requests
-->

This PR addresses issue #12466.

#### What does this implement/fix? Explain your changes.

This PR does the 3 following things:
- Rewrite the `cv` parameter description in `GridSearchCV`
- Link the new `CV splitter` description to an existing example
- Add an example with a custom iterable

Thanks for reviewing this!

Close #12466
2018-11-12 15:10:15 -05:00
^__^ 6c5f285a32 EXA Fix comment in plot-iris-logistic example (#12564) 2018-11-12 09:33:42 +08:00
Thomas Fan 9f842e3496 API Adds passthrough option to Pipeline (#11674) 2018-11-05 13:21:57 +11:00
Koen 81d2178ed0 EXA calculate number of noise points (#12428) 2018-10-23 07:56:53 +11:00
Xing Han Lu c76dc05881 EXA Fix labels overlap in Out-of-core classification of text documents example (#12359) 2018-10-13 15:01:59 +02:00
Andreas Mueller c13ba26c47
[MRG] Matplotlib tree plotting (#9251)
* add reingold tillford tree layout algorithm

* add first silly implementation of matplotlib based plotting for trees

* object oriented design for export_graphviz so it can be extended

* add class for mlp export

* add colors

* separately scale x and y, add arrowheads, fix strings

* implement max_depth

* don't use alpha for coloring because it makes boxes transparent

* remove unused variables

* vertical center of boxes

* fix/simplify newline trimming

* somewhere in the middle of stuff

trying to get rid of scalex, scaley

* remove "find_longest_child" for now, fix tests

* make scalex and scaley internal, and ax local.

render everything once to get the bbox sizes, then again to actually plot it with known extents.

* add some margin to the max bbox width

* add _BaseTreeExporter baseclass

* add docstring to plot_tree

* use data coordinates so we can put the plot in a subplot, remove some hacks.

* remove scalex, scaley, add automatic font size

* use rendered stuff for setting limits (well nearly there)

* import plot_tree into tree module

* set limits before font size adjustment?

* add tree plotting via matplotlib to iris example and to docs

* pep8 fix

* skip doctest on plot_tree because matplotlib is not installed on all CI machines

* redo everything in axis pixel coordinates

re-introduce scalex, scaley
add max_extents to tree to get tree size before plotting

* fix max-depth

parent node positioning and don't consider deep nodes in layouting

* consider height in fontsize computation

in case someone gave us a very flat figure

* fix error when max_depth is None

* add docstring for tree plotting fontsize

* starting on jnothman's review

* renaming fixes

* whatsnew for tree plotting

* clear axes prior to doing anything.

* fix doctests

* skip matplotlib doctest

* trying to debug circle failure

* trying to show full traceback

* more print debugging

* remove debugging crud

* hack around matplotlib <1.5 issues

* copy bbox args because old matplotlib is weird.

* pep8 fixes

* add explicit boxstyle

* more pep8

* even more pep8

* add comment about matplotlib version requirement

* remove redundant file

* add whatsnew entry that the merge lost

* fix merge issue

* more merge issues

* whitespace ...

* remove doctest skip to see what's happening

* added some simple invariance tests buchheim function

* refactor
___init__ into superclass

* added some tests of plot_tree

* put skip back in, fix typo, fix versionadded number

* remove unused parameters special_characters and parallel_leaves from mpl plotting

* rename tests to test_reingold_tilford

* added license header from pymag-trees repo

* remove duplicate test file.
2018-10-11 15:42:02 -04:00
Xing Han Lu 5df8cd3bd7 EXA Fix title, overlapping plots and axis labels in plot_ols_ridge_variance.py (#12296) 2018-10-09 21:44:57 +08:00
TakingItCasual f4e7d2b19a Converting http to https (3)... (#12302) 2018-10-05 18:50:31 +02:00
BenjaStudio 08924c340e EXA Fix bad data visualisation in "Importance of Feature Scaling" (#12280) 2018-10-05 15:17:20 +08:00
TakingItCasual 74b56dbc57 MNT Converting http to https (#12277) 2018-10-04 22:37:57 +08:00
Stephen Tierney 3f5bf97e81 DOC removed ambiguity in pipeline gridsearch example (#12272)
* Removed ambiguity in pipeline gridsearch example

* Formatted to pep8
2018-10-04 09:48:40 -04:00
Andreas Mueller fb7be879a3 [MRG + 1] return_train_score deprecation (#12241) 2018-10-03 19:24:14 +02:00
Hanmin Qin dd3b705f7b MNT Unused imports in examples 2018-10-02 17:12:19 +08:00
Hanmin Qin a3616f65dc MNT Use name instead of float to specify colors (#12199) 2018-10-01 16:32:42 +02:00
Hanmin Qin 6463406490 MNT Unused import in plot_gpr_co2.py 2018-09-26 16:37:29 +08:00
Olivier Grisel fc7d6e6986 [MRG] Fix FutureWarnings in logistic regression examples (#12114)
* Be more specific about logistic regression solver in examples

* Use early stopped SGD (faster) and plot cross-validated error for best models

* Fix LR solver in /plot_voting_probas.pyexamples/ensemble/plot_voting_probas.py

* Fix LR solver & scale data in plot_digits_classification_exercise.py

* Use saga solver in plot_logistic_l1_l2_sparsity.py

* Use LBFGS solver in plot_iris_logistic.py

* Use LBFGS in plot_logistic.py

* Use SAGA solver for Logistic Regression Path example

* Use LBFGS solver in plot_classifier_chain_yeast.py

* Use LBFGS solver in plot_rbm_logistic_classification.py

* typo

* typo

* Bump up pandas dependency to 0.17.1

* Bump up examples minimal deps to match pandas 0.17.1

* Fix figure layout for plot_digits_pipe.py

* Version numbers are not decimal numbers

* Set multinomial, no scaling to keep example simple, fix formatting of example doc

* Missing plt.tight_layout() in plot_voting_probas.py

* Missing plt.tight_layout() in plot_logistic.py
2018-09-24 18:22:40 +01:00
Dmitry Mottl 81601fb4b8 Fix typo (#12126)
Fix typo in `examples/compose/plot_column_transformer.py`
2018-09-21 09:49:45 +02:00
Max Copeland 2242f4c1d0 EXA use openml fetcher in plot_gpr_co2.py example (#12004) 2018-09-08 16:52:01 +02:00
Joel Nothman 79f5d147ea MNT Revert the deprecation of min_samples_leaf and min_weight_fraction_leaf (#11998) 2018-09-08 16:43:21 +02:00
Andreas Mueller 2ab2927b2e FIX divide mnist features by 255 in mlp example (#11961) 2018-09-01 09:56:58 +02:00
Andreas Mueller af80a42502 EXA Simplifying column transformer example by removing default values / making use of sparse threshold (#11958) 2018-09-01 09:31:22 +08:00
Hanmin Qin a47e7795f9 EXA Fix plot in plot_optics.py
Closes #11849
2018-08-30 22:07:07 +08:00