Commit Graph

159 Commits

Author SHA1 Message Date
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
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
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
Andreas Mueller 6dd6f8ffe8 minor fixes to the doc build 2015-09-11 17:32:51 -04:00
TomDLT 94eb61960a ENH add sag solver in LogisticRegression and Ridge 2015-09-10 13:28:02 -04:00
MechCoder f08963bd4f Add numerically stable softmax function to utils.extmath 2015-09-08 17:04:52 -04:00
MechCoder a5537aad15 override predict_proba in log_reg 2015-08-30 11:04:19 -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
Raghav R V 62325cbb58 MAINT merge _check_cv into check_cv as indices argument is removed in 0.17 2015-06-08 16:37:03 +05:30
Andreas Mueller 0650d5502e DOC adding backlinks to docstrings 2015-06-03 00:24:04 -04:00
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
Vinayak Mehta c6d420ee5f Modified docs 2015-03-30 01:38:17 +05:30
Loïc Estève a13a5859e8 DOC remove sphinx warnings when generating the doc
and fixes a few other doc problems while I was at it.

The main take-home message is to remember that you need a backslash when
your parameter type description exceeds one line.
2015-03-18 15:49:30 +01:00
Andreas Mueller 9bc4de8dae some fixes for sphinx and in examples 2015-03-02 12:50:53 -05:00
Andreas Mueller cd5166e82f make check_array convert object to float.
fix dtype check, add test. unfriend all multi-output estimators on facebook.

try to fix what is happening to y (by doing nothing to y)

make test work...

Make everything accept object y or say "invalid label"

fix multioutput linear models

add test for sensible error message.
2015-02-15 12:13:41 -05:00
Raghav R V b3fbccca38 FIX various mismatch between docstring and signature params
DOC max_iterations -> max_iter. Make it consistent with kmeans

MAINT Replace the deprecated dx parameter with d in the docstrings

MAINT Deprecation warning for max_iterations parameter.
2015-01-16 11:54:57 -05:00
trevorstephens 7c50e6c8eb various docstring fixes for web docs 2014-11-30 17:59:42 -08: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 d826dec54c Modify shape check on coef matrix in _logistic_regression_path. 2014-10-09 21:28:10 -04:00
swu c3b0a692d6 Wrap _multinomial_loss_grad in lambda function for passing into lbfgs. 2014-10-05 21:31:24 -04:00
swu f8473aff51 Reformatted docstrings in multinomial functions. Refactored multinomial
functions to avoid duplicating code.
2014-10-05 19:59:31 -04:00
swu e7baa77d5a Minor doc and formatting changes. 2014-09-25 22:13:36 -04:00
swu c7a002aba6 Update whats_new.rst. Add contact information to logistic.py. 2014-09-21 12:26:00 -04: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 1ec01ea01b Modified parameter description in docstring of
_multinomial_loss_grad_hess.
2014-09-10 19:30:53 -04:00
swu cdfa0ce73c Removed some unnecessary lines and reformatted for consistency in _multinomial_loss and _multinomial_loss_grad_hess. 2014-09-08 22:32:38 -04:00
swu 3e2ce556bb Merge remote-tracking branch 'upstream/master' into multinomial_newtoncg 2014-09-06 18:31:35 -04:00
swu f41352c861 Fixing more pep8 errors. 2014-09-06 14:37:30 -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
swu 2c25322708 Fixing docstring on _multinomial_loss. 2014-09-01 21:15:41 -04:00
swu 8559fbcd47 Fixed pep8 errors. Added docstring for _multinomial_loss. 2014-09-01 21:09:49 -04:00
swu 273fdc0f6c Add comments to _multinomial_loss_grad_hess function. 2014-09-01 12:56:49 -04:00
swu 6641781e1d Adding newton-cg solver for multinomial case. 2014-09-01 11:58:09 -04: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 34a4517983 ENH: Improved verbosity and denesting 2014-08-26 20:48:23 +02:00
MechCoder 959a4ac698 MAINT: Remove BaseLibLinear for LogisticRegression 2014-08-26 13:58:07 +02:00
MechCoder 55602361c1 DOC: Changed docstring style for optional arguments 2014-08-21 17:37:38 +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