Commit Graph

48 Commits

Author SHA1 Message Date
Lilian Besson e8a8a6751f Two typo on my change, sorry
- total_n_estimators should be sum(n_estimators) not len(..)
- keyword argument should be after non-keyword argument (call of ``_parallel_build_estimators`` with ``delayed`` on line 365-366.
2016-03-16 00:11:00 +01:00
Lilian Besson b286b85d23 Add and print a total_n_estimators information
Add to bagging.Bagging._parallel_build_estimators a total_n_estimators parameter, to improve the (optional) information printed if verbose > 1.

It felt weird to see 6 times in a row "building estimator 1 of 1" without any idea of total number of estimators to build, now it's fixed.
2016-03-14 23:49:38 +01:00
YenChenLin 46fc1be145 Remove redundant words in sklearn 2016-02-23 16:54:03 +08:00
Tim Head 7c425abcd6 base_estimator_ attribute is a single estimator not a list 2016-01-04 18:37:56 +01:00
Gilles Louppe 889e2d4024 Merge pull request #5678 from betatim/no-warning-iforest
[MRG+1] IsolationForest max_samples warning and calculation
2015-11-11 15:02:37 +01:00
Tim Head 6f6ec7fb00 Reference correct variable 2015-11-09 14:37:09 +01:00
Tim Head 7af49dfeed Fix doc string and number vs string ordering 2015-11-04 17:34:10 +01:00
Tim Head bc85b78b12 Test max_samples_ attribute, set max_depth in BaseBagging 2015-11-04 08:35:42 +01:00
KamalakerDadi f2e35411fa Added more versions of 0.17 2015-11-04 00:02:52 +01:00
KamalakerDadi d3a8f85c55 Added more documentation of version adds 2015-11-03 23:57:19 +01: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 80e22b3ddf Patch liblinear for sample_weights in LogisticRegression(and CV) 2015-10-23 00:00:31 -04:00
Jiali Mei 85223b9bcc a common test to check if classifiers fail when fed regression targets 2015-10-14 14:46:13 -04:00
vstolbunov ebd5dbc68a Fixed syntax and combined two test functions 2015-09-15 12:40:08 -04:00
Valentin Stolbunov 1a15fdc4f5 Added handling of sample weights in logistic.py
* Updated _check_solver_option to include sample_weight check
* Updated all calls to _check_solver_option()
* Updated documentation of class_weight throughout logistic.py
* Added sample_weight parameter to logistic_regression_path.
* Added handling of sample weights to logistic_regression_path.
* Added sample_weight parameter to _log_reg_scoring_path.
* Added handling of sample weights to _log_reg_scoring_path.
* Added sample_weight parameter to fit() in the LogisticRegression class.
* Added handling of sample sample weights in LogisticRegression.fit()
* Added sample_weight parameter to fit() in the LogisticRegressionCV class.
* Added handling of sample weights in LogisticRegressionCV.fit()
* Added test_logistic_regressioncv_sample_weights, which:
  * tests that a ValueError is raised if liblinear is used with
    sample weights
  * tests that passing sample weights as np.ones(y.shape[0]) is
    the same as not passing them (default None)
  * tests that using both lbfgs and newton-cg solvers with
    sample weights yields the same results
  * tests that passing class weights to scale one class is the
    same as passing sample weights for the training data of just
    that class
* Fixed bug with *= in logistic_regression_path.
* Fixed bug in test_logistic_regressioncv_sample_weights where
  no data was created prior to fitting.
* Changes to accepted sample_weight type.
* Fixed bug in naming of sample_weight when passed from
  _log_reg_scoring_path to logistic_regression_path.
* Fixed issue of sample_weight=None being converted to np.array()
  and then not being reconigzed as None.
* Added tests for LogisticRegression
* Attempting to fix same issue as 9d3becf by instead implementing
  if statement in bagging.py.
* Added TODO to eliminate check for liblinear w/ sample weights
  in bagging.py
2015-09-15 12:40:08 -04:00
Matti Lyra 4f6cd637ea Changed predict_log_proba so that it accepts sparse matrices. 2015-09-08 08:43:11 +02:00
Matti Lyra e648fb9bc4 Added the option of passing in a sparse X matrix into decision function, plus tests for sparse for all prediction functions. 2015-09-07 18:05:42 +02:00
Andreas Mueller 434ee958aa test for accepted sparse matrices 2015-08-26 22:00:55 -04:00
Andreas Mueller 0650d5502e DOC adding backlinks to docstrings 2015-06-03 00:24:04 -04:00
Tim Head 8add36bdb9 Better assert_raises use, API compliance, better ordering
Removed the need for printing attributes to raise
exceptions in the tests

Removed unnecessary setting of attributes in the
initialisation.

Moved check for warm_start and oob_score
2015-05-06 15:14:06 +02:00
Tim Head 919684cdf4 Keep estimators_samples_ and estimators_features_ across warmstarts
Keep these attributes as well as estimators_ when adding more
estimators via warm_start=True
2015-05-06 15:14:06 +02:00
Tim Head fb9e7254c6 oob_score will only be calculated if warm_start=False 2015-05-06 15:14:06 +02:00
Tim Head d83a362a6d Removed overly deep indentation 2015-05-06 15:14:06 +02:00
Tim Head 4408a180cc Test for unchanged n_estimator and indentation fix
Added a test to check nothing happens when calling
fit() without changing n_estimators. Fixed indentation
in fit() for this case.
2015-05-06 15:14:06 +02:00
Tim Head 2f563df512 Added warm_start to bagging
BaggingClassifier and BaggingRegressor now support warm_starts. Added
basic tests and documentation of the new functionality. Heavily
inspired by work on warm_start for Random forests.
2015-05-06 15:14:05 +02:00
Arnaud Joly c78f2624eb FIX raise ValueError if sample weight are passed but unsupported by the base estimator 2015-04-29 11:34:48 +02:00
Andreas Mueller 8f2780f579 Make BaggingClassifier use if_delegate_has_method in decision_function 2015-02-26 10:53:37 +01:00
Loïc Estève 67dcd99d82 TST fix tests with numpy 1.6.1
np.bincount raises an Exception with empty input arrays for numpy versions < 1.6.2
Add utils.fixes.bincount to tackle this issue and use it instead of np.bincount
2015-02-01 15:49:49 +01:00
Raghav R V abd31d2cad MAINT Make uniform the error raised for not fitted condition 2015-01-12 00:33:40 +05:30
akshayah3 16bc265ed8 dded tests to test_boosting 2014-09-28 14:58:55 +05:30
akshayah3 11d3696de2 Added make_fit_parameter method 2014-09-27 19:35:13 +05:30
Mathieu Blondel 0d9f6ccc4c Fix wrong attribute doc in BaggingRegressor. 2014-09-17 17:13:31 +09:00
Joel Nothman b3bdb08964 DOC fix formatting of attributes etc. in docstrings 2014-07-28 19:04:59 +10:00
Laurent Direr 9131413aaa Added warm start to random forests. 2014-07-25 13:58:06 +02:00
Laurent Direr db5be98070 Changed _partition_estimators signature to make it compatible with warm start. 2014-07-25 13:53:23 +02:00
Andreas Mueller c235c3b566 ENH add allowed_sparse named argument for @ogrisel 2014-07-20 15:31:28 +02:00
Andreas Mueller 6e2a83b4e1 remove check_arrays stuff and old input validation 2014-07-20 13:31:45 +02:00
Lars Buitinck 060d2647a8 DOC correct bagging docs regarding sparse inputs 2014-06-18 23:28:48 +02:00
Ilambharathi Kanniah 7a1a171b1a Sparse support in Bagging #3241 2014-06-17 15:48:17 -07:00
Ilambharathi Kanniah f8a70bc6d1 Sparse input support in BaggingClassfier and BaggingRegressor #3241 2014-06-17 10:16:10 -07:00
Lars Buitinck cc7f7d603d DOC trees/ensembles: class labels need not be integers 2014-03-21 10:54:20 +01:00
Lars Buitinck b97fb3c5fc MAINT drop support for NumPy < 1.6.1 2014-03-02 20:13:57 +01:00
Lars Buitinck aebcb1625a ENH use hasattr "predict_proba" in bagging
More robust than catching exceptions.
2014-02-27 21:00:26 +01:00
Lars Buitinck 7c621fc261 DOC no more "arithmetical order" for classes 2014-02-17 11:47:51 +01:00
Gilles Louppe 7ecae94720 DOC: bootstrap=True by default 2013-09-12 08:41:22 +02:00
Gilles Louppe f8bf44a251 FIX: logaddexp(-inf, -inf) == -inf and not NaN 2013-09-11 21:31:46 +02:00
Gilles Louppe cc7407654b ENH: move _partition_estimators to ensemble.base 2013-09-11 13:51:12 +02:00
Gilles Louppe 74d395215b ENH bagging meta-estimator 2013-09-11 13:51:09 +02:00