Commit Graph

269 Commits

Author SHA1 Message Date
Rohan Lekhwani e0697b01a7 MNT Used scipy.special.expit for the inverse of the logit function (#12931) 2019-01-08 18:35:19 +11: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
Hanmin Qin dd3b705f7b MNT Unused imports in examples 2018-10-02 17:12:19 +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
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
Joel Nothman 2fe58e517c Deprecate min_samples_leaf and min_weight_fraction_leaf (#11870) 2018-08-23 08:30:47 +03:00
Nicolas Goix 53622e856c FIX: enfore backward compatibility of decision function in Iforest (#11553) 2018-07-23 13:05:48 +02:00
Alexandre Boucaud f158e2dfe2 [MRG+1] Change CV defaults to 5 (#11557)
* add FutureWarning for methods with defaults=3

* add explicit cv values to fix assertion errors

* add tests for catching the FutureWarning

* Write current deprecation version

* Add deprecation in docstring

* change default cv value to None

* change cv from 3 to 5 in the examples

* upgrade doctests

* update doctest in tutorial

* update doctest in cross-validation doc

* fix tests

* add entry to whats new

* address Gael comments

* address Gael comments 2

* fix wrong indentation

* update doc

* add docstring deprecation warning in CV subclasses

* address Andy's comments

* fix PR number

* fix flake8

* add filterwarnings in tests

* fix doctests

* cv=None mendatory in Ridge

* fix warning related errors

* skip some doctests warnings

* make travis happy

* change from deprecated to versionchanged

* fix doctests and remove skipping

* address comments
2018-07-19 14:46:11 +02:00
annaayzenshtat 2242c59fc8 [MRG] EHN: Change default n_estimators to 100 for random forest (#11542)
<!--
Thanks for contributing a pull request! Please ensure you have taken a look at
the contribution guidelines: https://github.com/scikit-learn/scikit-learn/blob/master/CONTRIBUTING.md#pull-request-checklist
-->

#### 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
-->
Fixes #11128.

#### What does this implement/fix? Explain your changes.
Issues deprecation warning message for the default n_estimators parameter for the forest classifiers. Test added for the warning message when the default parameter is used.

#### Any other comments?


<!--
Please be aware that we are a loose team of volunteers so patience is
necessary; assistance handling other issues is very welcome. We value
all user contributions, no matter how minor they are. If we are slow to
review, either the pull request needs some benchmarking, tinkering,
convincing, etc. or more likely the reviewers are simply busy. In either
case, we ask for your understanding during the review process.
For more information, see our FAQ on this topic:
http://scikit-learn.org/dev/faq.html#why-is-my-pull-request-not-getting-any-attention.

Thanks for contributing!
-->
2018-07-17 14:42:59 -05:00
Andreas Mueller 0b8d362545 [MRG] Examples deprecations (#11561) 2018-07-17 00:08:04 -05:00
Joel Nothman 14764061f8
[MRG] DOC fix some sphinx warnings (#11241) 2018-06-21 20:43:21 +10:00
Joris Van den Bossche 007aa710bd FEA Refactor CategoricalEncoder into OneHotEncoder and OrdinalEncoder (#10523)
Deprecated some OneHotEncoder behaviour
2018-06-21 19:27:41 +10:00
Loïc Estève f247ad5adf MAINT change tabs to spaces.
* CircleCI bash scripts
* a couple of stray tabs in examples
2018-01-05 13:08:37 +01:00
Joris Van den Bossche a2ebb8cfd2 ENH: new CategoricalEncoder class (#9151) 2017-11-21 20:03:41 +11:00
Hanmin Qin 39e95c7982 improve example plot_forest_iris.py (#9989) 2017-10-24 12:49:53 -04:00
Hanmin Qin 32ac22870d [MRG+1] Fix warnings in lgtm.com (remove redundant code) (#9719) 2017-09-14 11:42:58 +02:00
Nabarun Pal 274724534d [MRG] Removes duplicate variable definition (#9688) 2017-09-05 09:27:18 +10:00
Andreas Mueller 9b5561148f [MRG] Figure improvements (#9648)
* Example plots render poorly in dev

* flake8 + bias_variance

* title padding

* misc ensemble variance plotting

don't use rcParams to set size of a single figure,
put legend outside of plot

* semisupervised plotting fixes

use explicit kwargs in subplots_adjust, change hspace, don't change aspect ratio of imshow.
2017-09-01 10:29:05 +02:00
(Venkat) Raghav, Rajagopalan 312b1dfc74 ENH Early stopping for Gradient Boosting Classifier/Regressor (#7071) 2017-08-09 22:02:47 +02:00
Balakumaran Manoharan 04be1a9799 [MRG + 1] DOC Fix Sphinx errors (#9420)
* Fix Rouseeuw1984 broken link

* Change label vbgmm to bgmm
Previously modified with PR #6651

* Change tag name
Old refers to new tag added with PR #7388

* Remove prefix underscore to match tag

* Realign to fit 80 chars

* Link to metrics.rst.
pairwise metrics yet to be documented

* Remove tag as LSHForest is deprecated

* Remove all references to randomized_l1 and sphx_glr_auto_examples_linear_model_plot_sparse_recovery.py.
It is deprecated.

* Fix few Sphinx warnings

* Realign to 80 chars

* Changes based on PR review

* Remove unused ref in calibration

* Fix link ref in covariance.rst

* Fix linking issues

* Differentiate Rouseeuw1999 tag within file.

* Change all duplicate Rouseeuw1999 tags

* Remove numbers from tag Rousseeuw
2017-07-30 15:22:10 +10:00
Aarshay Jain a74d31a339 ENH 13 more examples fixed with matplotlib 2.0 (#9029) 2017-06-28 14:56:27 +02:00
plagree 1f6ac72df7 [MRG] DOC examples with correct notebook style (#9061)
* DOC examples with correct notebook style

* Modifications in examples/ to avoid unwanted notebook style

* Remove last notebook style example

* Space formatting to avoid notebook style
2017-06-20 14:48:57 +02:00
Hanmin Qin bc63f49555 [MRG] DOC improve example plot_forest_iris.py (#8649) 2017-03-27 21:39:28 +11:00
Kaushik Lakshmikanth c77003caf9 [MRG] DOC Isolation Forest decision function doc - Clarify that it computes normality not abnormality. (#7792) 2016-10-31 12:07:50 +11:00
Andreas Mueller 5bb983013c minor doc fixes (#7514)
fix scoring function table

minor fixes to whatsnew
2016-09-28 11:31:29 -07:00
elena-sharova 2fce9ae78d Provided a fix for issue #7140 - Minor discrepancy in hashing feature
transformation example.
2016-09-17 15:41:25 +01:00
Yen 42120e50bb [MRG+1] Rename CV params n_{folds,iter} to n_splits (#7187)
* Rename n_iter to n_splits

* Fix bug

* Fix examples

* Add spaces

* Rename n_folds to n_splits

* Fix error

* Fix doc

* Fix doc

* Fix example

* Rename variables name

* PEP8

* Fix error message

* Add whats_new

* Fix test

* Fix doc

* Fix doc

* Make test clear
2016-08-16 13:56:55 -07:00
Óscar Nájera 8b46c616df Python 2 backwards compatibility in example
This lines breaks the gallery build in python 2, which is the version on
which CircleCI runs. Other option is to build the docs on Python 3
2016-08-03 20:23:50 +02:00
Shota e2a2b4d403 Fix typos (#6942) 2016-06-27 18:13:49 +02:00
Saiwing Yeung c5fd5cbb7e DOC: fixed typos and one style issue in plot examples
The comment in a few example plots refer to "the mesh [x_min, m_max] x
[y_min, y_max]" when it should be "x_max".

Also fixed the spacing in plot_random_forest_embedding.py `[x_min,
x_max] x [y_min, y_max]` to `[x_min, x_max]x[y_min, y_max]` to comply
with the coding style of other files with similar code (like those in
the current pull request).
2016-04-25 11:59:40 +08:00
Tim Head 07cede74ca Multitarget regression meta estimator
Register OneVsRestRegressor as meta estimator

Rename to a more sensible name

Parallel predict and sparse support

Started MultiOutput documentation

Move code to new file multioutput.py

Continuing the move to new multioutput module

Added sample weight support

Better test for sample weights and actually support weights

Added a new test using weighted vs repeated samples to
test sample weight support. Uncovered that weights
were not actually passed on to underlying estimator.

Comment on multiprocess overheads

Move parallel_helper to utils.fixes

This helper works around a python2 limitation on pickling
instance methods

Example of multi-output regression with gradient boosting

Switch to uniform weighted score and updated example

The example now uses a RF with and without the MultiOutput
meta estimator

Added note for removing `score` method

Addressing comments on MultiOutputRegressor

MultiOutputregressor better test for weighted samples

Fix ups

Use explicit keyword argument for passing sample weights and
fix random_state on train-test split in the example
2016-03-10 16:06:08 -05:00
Olivier Grisel 41035a0f19 ENH less verbose output in plot_partial_dependence example 2016-01-04 14:19:28 +01:00
trevorstephens eb4bd0931c fix pplot example for uneven grids 2016-01-04 14:19:27 +01:00
Gael Varoquaux 317dea8a05 Merge pull request #6005 from seales/SpellingFix
[MRG+1] General spelling fixes
2016-01-04 13:42:20 +01:00
Loïc Estève 3daab8a998 FIX fetch_california_housing
Using a different resource than lib.stat.cmu.edu which has not been fixed yet.
2016-01-04 11:52:31 +01:00
seales 0485ada58b General spelling fixes 2015-12-16 09:46:42 -08:00
Andreas Mueller 37c8d0297b HOTFIX actually fixing the california housing problem 2015-12-14 11:49:41 -05:00
Andreas Mueller f9ae546a67 HOTFIX skip partial dependence plot so we can run circleci without errors. 2015-12-11 16:16:57 -05:00
Andreas Mueller 5b1aca08c2 MAINT Don't use deprecated 1d X (or deprecated matplotlib stuff) in examples. 2015-12-10 12:11:48 -05:00
Andreas Mueller fb123ed24b More doc fixes. Latex builds again. 2015-11-20 16:30:45 -05:00
Raghav R V f67e911124 DOC Modify documentation/examples for the new model_selection module 2015-10-29 16:49:23 +01:00
Arnaud Joly d9f327730c Merge pull request #5531 from arjoly/float-min_samples
[MRG +2 ]  min_samples_split and min_samples_leaf now accept a percentage
2015-10-26 14:51:48 +01:00
Tim Head d01dd2fd77 English language changes to IsolationForest documentation
Narrative documentation, doc strings and example updates for IsolationForest
2015-10-26 08:40:37 +01:00
yelite fea218e5cf In tree, min_samples_split and min_samples_leaf now accept float number as percentage. 2015-10-24 23:18:52 +02:00
ngoix a75eb63194 iforest
example + benchmark

explanation

make some private functions + fix public API

IForest using BaseForest base class for trees

debug + plot_iforest

classic anomaly detection datasets and benchmark

small modif

BaseBagging inheritance

shuffle dataset before benchmarking

BaseBagging inheritance

remove class label 4 from shuttle dataset

pep8 + rm shuttle.csv bench_IsolationForest.png + doc decision_function

add tests

remove comments

fetching kddcup99 and shuttle datasets

fetching kddcup99 and shuttle datasets

pep8

fetching kddcup99 and shuttle datasets

pep8

new files iforest.py and test_iforest.py

sc

alternative to pandas (but very slow)
in kddcup99.py

faster parser

sc

pep8 + cleanup + simplification

example outlier detection

clean and correct

idem

random_state added

percent10=True in benchmark

mc

remove shuttle + minor changes

sc

undo modif on forest.py and recompile cython on _tree.c

fix travis

cosmit

change bagging to fix travis

Revert "change bagging to fix travis"

This reverts commit 30ea500eb818c7a2c6ea5c3d63e75c6935aa3a35.

add max_samples_ in BaseBagging.fit to fix travis

mc

API : don't add fit param but use a private _fit + update tests + examples to avoid warning

adapt to the new structure of _tree.pyx

cosmit

add performance test for iforest

add _tree.c _utils.c _criterion.c

TST : pass on tests

remove test

relax roc-auc to fix AppVeyor

add test on toy samples

Handle depth averaging at python level

plot example: rm html add png

load_kddcup99 -> fetch_kddcup99 + doc

Take into account arjoly comments

sh -> shuffle

add decision_path code from #5487 to bench

Take into account arjoly comments

Revert "add decision_path code from #5487 to bench"

This reverts commit 46ad44ab487f4fd2728d927cbe09000330e8663e.

fix bug with max_samples != int
2015-10-24 15:17:32 +02:00
MechCoder c31de116f9 Fix broken examples using RandomTreeEmbeddings
RandomTreeEmbeddings overwrites the fit_transform method of
_LearntSelectorMixin
2015-10-16 12:44:04 -04:00
Michael Patterson 3c22232c4b Now plots based on the number of features in X
In previous commit,  I used n_features to set the number of features, and plotted based on that variable. Based on feedback, I removed n_features, and now plotting is based on X.shape[1]. This makes the code general and easy to port. I copied this into an iPython notebook to verify it still outputs the correct graph.
2015-10-11 23:09:39 -07:00
Michael Patterson 0fec61a709 Changed the number of features from 10 to variable
I ported this code into my own, and when I tried plotting, I found the number of features was hard coded to 10. By switching to a set variable, the number of features is no longer a magic number, and the code is more readable.
2015-10-11 16:58:41 -07:00
MechCoder 5a0db1717a 1. Added parameter prefit to pass in a fitted estimator.
2. Use assert_warns instead of catch_warnings
3. Remove depracation warnings in common tests.
2015-10-09 01:57:36 -04:00