Commit Graph

974 Commits

Author SHA1 Message Date
MechCoder 80e22b3ddf Patch liblinear for sample_weights in LogisticRegression(and CV) 2015-10-23 00:00:31 -04:00
Alexandre Gramfort 5a58e56826 Merge pull request #5487 from arjoly/example-node
[MRG+1] Add an example and a method to analyse the decision tree stucture
2015-10-22 13:31:49 +02:00
Gael Varoquaux 744d161d37 Merge pull request #5431 from hlin117/nan-targets
[MRG + 2] Add check to regression models to raise error when targets are NaN
2015-10-22 09:36:12 +02:00
Arnaud Joly 7d4755e317 Add a decision_path function to forest estimator 2015-10-21 17:05:56 +02:00
Arnaud Rachez 62633f701b Addressed comments on PR #5451 2015-10-21 10:24:23 +02:00
Arnaud Rachez 5db2adf93c MAINT Removed deprecated stuff. 2015-10-21 10:24:23 +02:00
hlin117 34c8399be1 #5322: Fixing the fix - now RFs should be okay 2015-10-20 10:36:47 -05:00
hlin117 d62e316882 #5322: Resolving Random Forest build errors (bad input shape) 2015-10-20 10:36:47 -05:00
hlin117 b4e746bb5c Resolving rebase conflicts on forest.py 2015-10-20 10:33:22 -05:00
Raghav R V e3afc0e8c9 MAINT move custom error/warning classes into sklearn.exceptions
ENH NonBLASDotWarning -> EfficiencyWarning; Improve error message
DOC Add exceptions module to modules/classes.rst
MAINT Move ConvergenceWarning, UndefinedMetricWarning et al into exceptions
MAINT Remove ChangedBehaviorWarning from base
DOC/FIX Improve DataConversionWarning's docstring
2015-10-19 22:35:35 +02:00
Raghav R V a87011262a FIX precision to float64 across the codebase 2015-10-16 11:20:29 +02:00
Andreas Mueller 1b9e791d92 Merge pull request #5398 from rvraghav93/fix_for_numpy_10
[MRG + 2] FIX dtypes to conform to the stricter type cast rules of numpy 1.10
2015-10-15 12:45:43 -04:00
=?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= cac1d281a4 FIX AdaBoostRegressort test failure with numpy 1.10 2015-10-15 18:21:52 +02:00
Raghav R V 4f4c3598e6 FIX dtypes to conform to the stricter type cast rules of numpy 1.10
FIX set copy to (copy & whiten).

FIX/DOC Use float outputs for doctest
2015-10-15 18:21:51 +02:00
Jiali Mei 85223b9bcc a common test to check if classifiers fail when fed regression targets 2015-10-14 14:46:13 -04:00
Manoj Kumar 652b950074 Merge pull request #4242 from MechCoder/select_from_model
[MRG+1] Implemented SelectFromModel meta-transformer
2015-10-10 23:15:06 -04: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
Vighnesh Birodkar 735dd1fdca Fix warnings during tests 2015-10-08 14:52:21 -04:00
MechCoder 2416e2aee6 Catch filters instead of removing the tests 2015-10-05 11:24:02 -04:00
Jacob Schreiber 02c0029baa ENH gbt sparse support 2015-09-28 13:44:12 -07:00
Jacob Schreiber 798aeaf10b FIX criterion variable names 2015-09-23 11:20:01 -07:00
Jacob Schreiber 442b49a5a3 ENH criterion file cleaned up 2015-09-22 00:03:31 -07: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
Gilles Louppe b099a59465 Merge pull request #5261 from glouppe/check-importances
[MRG+1] Stronger tests for variable importances
2015-09-14 07:45:42 +02:00
Gilles Louppe 3575db60a1 TEST: check parallel computation 2015-09-14 07:38:01 +02:00
Gilles Louppe 5f589fbbb4 TEST: reduce test time, variable name, etc 2015-09-13 20:09:07 +02:00
Gilles Louppe bcc6f1bf57 TEST: take comments into account 2015-09-12 18:41:26 +02:00
Gilles Louppe 78974def03 TEST: use sklearn.fixes.bincount 2015-09-12 16:08:10 +02:00
Gilles Louppe 25dbb155a6 TEST: stronger tests for variable importances 2015-09-12 15:18:51 +02:00
Andreas Mueller 6dd6f8ffe8 minor fixes to the doc build 2015-09-11 17:32:51 -04:00
Gilles Louppe 7e2453ac48 Merge pull request #5242 from arjoly/stable-test-2
FIX unstable test due to bootstrap and unset random state
2015-09-11 09:16:08 +02:00
Arnaud Joly 994cbe1faf FIX unstable test due to bootstrap and unset random state 2015-09-10 14:36:44 +02:00
Olivier Grisel 470b9a48be Merge pull request #5228 from jmschrei/gb_apply
[MRG+1] Apply method added to GradientBoosting
2015-09-10 10:37:25 +02:00
Jacob Schreiber bc225a5e1a ENH apply method added to Gradient Boosting 2015-09-10 10:32:51 +02:00
Vighnesh Birodkar 2f099334f9 MAINT deprecate 1d input arrays for all estimators
Passing 1D arrays to check_array, without setting `ensure_2d` to false now
raises a deprecation warning before reshaping it. This will later throw an
error.

All Scaler classes also throw warnings when 1D arrays are passed.

All unit tests/doctests are modified to ensure that no 1D arrays are passed,
except in explicit 1D array tests where the warnings have been silenced.

Additional tests are also included which check for different 1D array cases.

2D array tests with one samples and one features are also added and where
they failed, `check_array` call has been modified to give a more useful error
message
2015-09-09 15:49:58 +02:00
Jacob Schreiber 5978c0bbdf ENH split _tree.pyx into several files 2015-09-09 11:28:24 +02:00
Gilles Louppe 7fccf45e49 Merge pull request #5207 from MechCoder/ensemble_sample_weight_bug
[MRG+1] [BUG] AdaBoostRegressor should not raise errors if the base_estimator does not support sample_weights
2015-09-09 08:48:13 +02: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
MechCoder bb2acedac9 AdaBoostRegressor should not raise errors if the base_estimator
does not support sample_weights
2015-09-06 23:30:37 -04:00
Gael Varoquaux 190abde442 Merge pull request #4881 from sonnyhu/weighted_least_squares
[MRG + 1] add sample_weight into LinearRegression
2015-08-30 16:35:00 +01:00
Andreas Mueller 434ee958aa test for accepted sparse matrices 2015-08-26 22:00:55 -04:00
Sonny Hu a88f6ecf9d add sample_weight into LinearRegression 2015-08-13 14:32:07 -04:00
Raghav R V 664d78eb7c MAINT Remove support for the deprecated sequence of sequences
MAINT Remove sequence of sequence support from datasets
MAINT Remove return_indicator param
MAINT Remove multilabel-seq test in OVR
MAINT Remove multilable-seq test in check_cv
MAINT Remove multilabel seq test in label_binarizer
TST type_of_target returns "unknown" for multilabel-sequence types
TST _check_targets should raise a ValueError
DOC show multilabel indicator as an example; remove return_indicator param
DOC use consistent lower case y for target
2015-08-11 22:26:44 +05:30
Olivier Grisel a45a50efa4 Merge pull request #5019 from glouppe/voting-get_params
[MRG+1] FIX: ensure that get_params returns VotingClassifier own params
2015-07-23 21:28:24 +02:00
Olivier Grisel 77d3fd9332 Merge pull request #4967 from stephen-hoover/threshold-boosting-samme_proba
[MRG+2] BUG Use epsilon threshold in `_samme_proba`
2015-07-23 21:18:34 +02:00
Gilles Louppe 34c4930591 FIX: ensure that get_params returns VotingClassifier own params 2015-07-23 08:34:26 +02:00
Ankur Ankan 4243412173 fixes bug in oob_score when X is sparse.csc matrix [refs #4744] 2015-07-17 14:46:14 +05:30
Stephen Hoover 0156dcf114 BUG Use epsilon threshold in `_samme_proba` and `_boost_real`
Instead of thresholding <0 probabilities to 1e-5, threshold <epsilon to epsilon. This avoids the issue of, e.g., probability values of 0 becoming larger than values of 1e-7.

Add a unit test for `_samme_proba` which checks that probability ordering is unchanged.

Resolves issue #4944 .
2015-07-12 13:34:40 -05:00