Commit Graph

82 Commits

Author SHA1 Message Date
MechCoder 41cbfded7c Add check for sample_weights 2015-10-23 00:06:07 -04:00
MechCoder 80e22b3ddf Patch liblinear for sample_weights in LogisticRegression(and CV) 2015-10-23 00:00:31 -04:00
TomDLT d439dc4d9e FIX class_weight in LogisticRegression and LogisticRegressionCV 2015-10-21 17:41:39 +02: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
vstolbunov ebd5dbc68a Fixed syntax and combined two test functions 2015-09-15 12:40:08 -04:00
vstolbunov 942ff5c654 Updated logistic regression tests with sag solver 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
TomDLT 94eb61960a ENH add sag solver in LogisticRegression and Ridge 2015-09-10 13:28:02 -04:00
MechCoder c85f2ad596 Add non regression test 2015-08-30 11:44:58 -04:00
MechCoder c3cfebe4d6 [BUG] predict_proba should use the softmax function in the multinomial case 2015-08-28 17:06:20 -04:00
MechCoder 1886f2bc43 [MRG] [BUG] Pass penaly to the final logistic regression fit 2015-06-24 13:18:25 +05:30
Andreas Mueller eedc1cddab Use more natural class_weight="auto" heuristic 2015-06-01 12:49:53 -04:00
TomDLT fc9d7befe1 FIX use random_state in LogisticRegression 2015-05-27 16:59:12 +02:00
TomDLT 355dc7c8f1 ENH improve parameter check in LogisticRegression 2015-05-27 10:16:36 +02:00
TomDLT 922d71aafe FIX check parameter in LogisticRegression 2015-05-21 13:04:47 +02:00
TomDLT c51f067652 ENH change func_grad_hess into grad_hess
FIX correct testing

FIX xrange to range for python 3
2015-05-19 16:21:12 +02:00
Raghav R V cd2ee7e454 MAINT docstring --> comments to prevent nose from using doc in verbose mode 2015-03-21 11:16:49 +05:30
Vinayak Mehta a4f8f083a5 Specified original intercept_scaling value 2015-03-19 20:27:11 +05:30
Vinayak Mehta 5f44a8e2a3 Raising an error when intercept_scaling is zero
Added test for intercept_scaling

Fixed silly mistake

Added assert_raise_message

added test for logistic regression

removed None

added more tests
2015-03-17 23:23:39 +05:30
Andreas Mueller f1b8283c95 catch some warnings, be less verbose in testing. 2015-03-02 14:40:35 -05:00
Alexandre Gramfort 6744be298a Merge pull request #3646 from s8wu/multinomial_newtoncg
[MRG+2] Multinomial newtoncg
2014-10-16 09:04:18 +02:00
swu 862d82111e Modified hessp function in _multinomial_loss_grad_hess to compute r_yhat
in place.
Simplied conditional statements that branches based on solver +
multi_class input combinations.
Extended tests on multinomial LogisticRegression to include newton-cg
solver case.
Updated doc string of LogisticRegression to include newton-cg solver in
multinomial case.
2014-09-20 15:11:31 -04:00
MechCoder 74857521ac FIX: Make sure LogRegCV with solver=liblinear works with sparse matrices 2014-09-18 19:00:19 +02:00
swu af4df3345f Adding test cases for multinomial LogisticRegression using newton-cg
solver.
2014-09-13 22:02:25 -04:00
MechCoder 891839cd8d DOC: Explain prediction when decision_function is zero
LogisticRegression and liblinear's predictions differ when the
decision function is zero. Explain why and what to do in that case.

Fixes #3600 (by documenting the won't fix status).
2014-09-05 13:46:44 +02:00
MechCoder a7ccbb8096 MAINT: Made the following changes
1. Use a single loop for both ovr and multinomial conditions
2. Better warning messages for penalty and loss conditions
3. Convergence warnings print only if verbose > 0
4. Used check_X_y instead of check_X
2014-08-30 12:26:40 +02:00
MechCoder a92cd805af FIX: PEP8 Errors and unused imports 2014-08-21 17:37:38 +02:00
MechCoder d80ef50b11 DOC: Improved documentation and error messages 2014-08-21 17:37:38 +02:00
MechCoder 89226b69b4 COSMIT: Made the following changes
1. Removed true from 'true multinomial loss'
2. Replaced OvA with OvR
3. Update whatsnew.rst
2014-08-21 17:37:38 +02:00
MechCoder b2e0e6e982 TST: Tests for multinomial logistic regression 2014-08-21 17:37:38 +02:00
MechCoder 4cd177758f ENH: Merge MultinomialLR into LR with multi_class='multinomial' 2014-08-21 17:37:37 +02:00
MechCoder d5ceb89ed5 ENH: Add support for class weights 2014-08-21 17:37:37 +02:00
Lars Buitinck 13ca2b2859 ENH multinomial logistic regression using L-BFGS 2014-08-21 17:37:37 +02:00
MechCoder ad5773cfca TST: Added test to check ConvergenceWarning 2014-08-01 12:15:57 +02:00
Olivier Grisel 11d396542c FIX numerically unstable test_logistic.py 2014-07-25 00:21:42 +02:00
MechCoder 2374a09246 FIX: Increase testing accuracy 2014-07-23 16:04:30 +02:00
MechCoder 4de4849e8a FIX: Fixes for the cross_validation failure 2014-07-23 13:24:41 +02:00
MechCoder 2ea804e61f Update whats new! 2014-07-22 18:29:51 +02:00
MechCoder 67585f6e6f MAINT: Improve documentation and coverage 2014-07-22 17:28:16 +02:00
MechCoder c8540df986 FIX: Add DataConversionWarning 2014-07-22 16:57:41 +02:00
MechCoder 86dab1ea86 ENH: Added warnings for convergence, added support for l1 penalty if solver is liblinear 2014-07-22 16:57:41 +02:00
MechCoder 10a411fe66 ENH: Logistic Regression now supports newton-cg and lbfgs 2014-07-22 16:57:41 +02:00
MechCoder 7b3bfefaa0 Made the following changes
1. Fixed random state
2. Object dtype support
3. Remove outdated "don't test multiclass" tests
2014-07-22 16:57:41 +02:00
MechCoder 60f454f8ec FIX: PEP8 and other cosmits 2014-07-22 16:57:40 +02:00
MechCoder 191119b74a TST: Tests to verify OvA behavior 2014-07-22 16:57:40 +02:00
MechCoder f9871cd824 ENH: Added one-vs-all fit in case of multi-class data 2014-07-22 16:57:40 +02:00
MechCoder 51a1831aaa TST: Improved tests 2014-07-22 16:57:40 +02:00
Manoj-Kumar-S 7c935a3235 FIX: Doctests 2014-07-22 16:57:40 +02:00
Manoj-Kumar-S a4d9f77805 More docs and tests for LogisticRegressionCV 2014-07-22 16:57:40 +02:00
Manoj-Kumar-S b8c6b4c5c2 TST: Add tests to explicitly check hessian, loss and gradient for fit_intercept 2014-07-22 16:57:40 +02:00