Commit Graph

242 Commits

Author SHA1 Message Date
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
MechCoder 2ee718cc75 Add narrative docs and fix examples 2015-10-05 11:25:06 -04:00
Jacob Schreiber bc225a5e1a ENH apply method added to Gradient Boosting 2015-09-10 10:32:51 +02:00
Alexandre Gramfort 6126eced61 unused import 2015-08-31 21:52:48 +02:00
Tim Head ea8d092f2c Explicitly mention RandomTreesEmbedding in the text 2015-08-14 20:04:46 +02:00
Tim Head 89ec72ea2f Example to demonstrate use of tree.apply() method
This example trains several tree based ensemble methods and uses
them to transform the data into a high dimensional, sparse space.
The trains a linear model on this new feature space. The idea is
taken from:

Practical Lessons from Predicting Clicks on Ads at Facebook Junfeng Pan,
He Xinran, Ou Jin, Tianbing XU, Bo Liu, Tao Xu, Yanxin Shi, Antoine
Atallah, Ralf Herbrich, Stuart Bowers, Joaquin Quiñonero Candela
International Workshop on Data Mining for Online Advertising (ADKDD)

https://www.facebook.com/publications/329190253909587/
2015-08-11 20:38:07 +02:00
rasbt c655bb9b0e changed clf to regr in decision tree regression examples 2015-06-17 15:20:23 -04:00
Andreas Mueller e8356d39d5 FIX add missing numpy imports to VotingClassifier examples, pep8 fixes. 2015-05-12 16:41:44 -04:00
Gilles Louppe fa5bd2c70b Merge pull request #4692 from kianho/plot-ensemble-oob-trace
Refined the docstring for plot_ensemble_oob.py (#4665)
2015-05-08 14:54:00 +02:00
Kian Ho 2656f7be61 Refined the docstring for plot_ensemble_oob.py.
- Minor change to #4665: cleaned up the writing style of the documentation.
2015-05-08 22:50:42 +10:00
Gael Varoquaux ef94a2a671 Merge pull request #4665 from kianho/plot-ensemble-oob-trace
[MRG+1] Script for example ensemble OOB error plot. Fixes #4273
2015-05-08 11:36:44 +02:00
Kian Ho e038cb3759 Made more amendments according to PR feedback.
A number of further amendments to the plot_ensemble_oob.py example
script were suggested in the PR thread and addressed accordingly:

- The ExtraTreesClassifier models were removed from the example, since
  they don't use bootstrapping by default (but can be using bootstrap=True).

- Included the OOB errors for RandomForestClassifier models with various
  max_features values.

- Changed the sample datasets to make for a nicer looking plot.

- Changed "cross-validated" to "validated" in the docstring.

- Added the relevant page numbers to the Hastie et al. reference.

- PEP8 compliance, fixed line > 80 chars.
2015-05-07 18:37:51 +10:00
Kian Ho b6ce3226f7 Amended plot_ensemble_oob.py according to #4665.
@amueller provided feedback on improving my original PR (#4665) of the
plot_ensemble_oob.py script.

A number of major changes were made accordingly:

- Used `matplotlib.pyplot` instead of `pylab`.

- To improve the run-time to <10secs, I reduced the dimensionality of
  the sample dataset and set the max. number of estimators to 150.

- To avoid OOB warnings, the min. number of estimators was set to 15.
  Values <15 would still raise the warnings.

- The script is PEP8-compliant via the `pep8` command-line script. I
  needed to move `print(__doc__)` and author list comments.

- Re-added @amueller to the author list (had mistakenly been removed).

- Added a link to this example to the user-guide under the `Ensemble
  Methods` section.
2015-05-05 17:36:22 +10:00
Kian Ho 5b2ee7a14f Minor amendments to plot_ensemble_oob.py.
Corrected typo in the docstring.

Removed explicit figure size statement.

Fixed docstring formatting.

Corrected the author list.
2015-05-05 16:58:50 +10:00
Kian Ho 017f289460 Initial commit of plot_ensemble_oob.py
This is a proposed fix for #4273.
2015-05-03 04:12:51 +10:00
rasbt 2910198f14 votingclassifier 2015-04-20 19:27:30 -04:00
Andreas Mueller c970fb51e7 COSMIT spelling 2015-01-15 15:09:35 -05:00
Brian Wignall 48cbbab89b CLN: Fix typo in comment 2014-12-13 09:14:47 -05:00
Noel Dawe 09896dc2dd plot_adaboost_twoclass.py: minor improvements 2014-10-02 22:41:51 -07:00
Andreas Mueller 5b247f90e4 move around examples for better structure. 2014-07-17 09:35:30 +02:00
Olivier Grisel 30347e9a80 FIX python 3 compat for plot_bias_variance.py 2014-06-23 11:04:39 +02:00
ugurthemaster b929656592 Update plot_adaboost_regression.py
Library imports have been moved to top of the file.
2014-05-26 09:48:50 +03:00
IvicaJovic 8dc8673525 fix wrong confidence interval 2014-05-17 22:28:30 +02:00
Rajat Khanduja cca6fc7e8b Some more examples updated to use matplotlib.pyplot 2014-05-16 09:42:02 +05:30
Rajat Khanduja 7d10d98492 Fixed some PEP8 violations even present in master branch, in examples/
This fixes some of the violations that were not caused by the change to pyplot
from pylab.
2014-05-15 09:35:24 +05:30
Noel Dawe f260259611 xrange -> range 2014-04-16 23:40:56 -07:00
Noel Dawe 65bbe9ebbc plot_adaboost_multiclass.py: handle case where boosting terminated early. Add missing author on other boosting examples. 2014-04-16 17:36:38 -07:00
Lars Buitinck b97fb3c5fc MAINT drop support for NumPy < 1.6.1 2014-03-02 20:13:57 +01:00