Commit Graph

171 Commits

Author SHA1 Message Date
hlin117 54af09e6f1 Fixing typos in logistic regression docs 2016-03-21 18:57:03 -05:00
Tom Dupré la Tour 06bf797c0d DOC update docstring in LogisticRegression 2016-03-15 11:11:59 +01:00
Maniteja Nandana 6d3e87a707 DOC: Clarify the scoring in Logistic Regression
Clarifies the allowed parameters for scoring in LogisticRegressionCV fixes #6480
[skip ci]
2016-03-03 22:19:29 +05:30
Gael Varoquaux 317dea8a05 Merge pull request #6005 from seales/SpellingFix
[MRG+1] General spelling fixes
2016-01-04 13:42:20 +01:00
Tom Dupré la Tour e152df2a62 DOC add version_added for multinomial sag 2015-12-28 10:18:30 +01:00
seales 0485ada58b General spelling fixes 2015-12-16 09:46:42 -08:00
hlin117 e4d89885d1 \#6001: Adding LogisticRegression's default param for 'solver'
\#6001: Adding more default parameters to LogisticRegression

\#6001: Removing 'optional' from LogisticRegression docstring, fixed verbose typo
2015-12-12 02:59:05 -06:00
TomDLT 9f136ff293 ENH add multinomial SAG solver for LogisticRegression 2015-12-04 18:36:37 +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
KamalakerDadi 2249daaea8 Version added for all new classes 2015-11-03 23:54:42 +01:00
Raghav R V 3f8743f47b Main Commits - Major
--------------------

* ENH Reogranize classes/fn from grid_search into search.py
* ENH Reogranize classes/fn from cross_validation into split.py
* ENH Reogranize cls/fn from cross_validation/learning_curve into validate.py

* MAINT Merge _check_cv into check_cv inside the model_selection module
* MAINT Update all the imports to point to the model_selection module
* FIX use iter_cv to iterate throught the new style/old style cv objs
* TST Add tests for the new model_selection members
* ENH Wrap the old-style cv obj/iterables instead of using iter_cv

* ENH Use scipy's binomial coefficient function comb for calucation of nCk
* ENH Few enhancements to the split module
* ENH Improve check_cv input validation and docstring
* MAINT _get_test_folds(X, y, labels) --> _get_test_folds(labels)
* TST if 1d arrays for X introduce any errors
* ENH use 1d X arrays for all tests;
* ENH X_10 --> X (global var)

Minor
-----

* ENH _PartitionIterator --> _BaseCrossValidator;
* ENH CVIterator --> CVIterableWrapper
* TST Import the old SKF locally
* FIX/TST Clean up the split module's tests.
* DOC Improve documentation of the cv parameter
* COSMIT consistently hyphenate cross-validation/cross-validator
* TST Calculate n_samples from X
* COSMIT Use separate lines for each import.
* COSMIT cross_validation_generator --> cross_validator

Commits merged manually
-----------------------

* FIX Document the random_state attribute in RandomSearchCV
* MAINT Use check_cv instead of _check_cv
* ENH refactor OVO decision function, use it in SVC for sklearn-like
  decision_function shape
* FIX avoid memory cost when sampling from large parameter grids

ENH Major to Minor incremental enhancements to the model_selection

Squashed commit messages - (For reference)

Major
-----

* ENH p --> n_labels
* FIX *ShuffleSplit: all float/invalid type errors at init and int error at split
* FIX make PredefinedSplit accept test_folds in constructor; Cleanup docstrings
* ENH+TST KFold: make rng to be generated at every split call for reproducibility
* FIX/MAINT KFold: make shuffle a public attr
* FIX Make CVIterableWrapper private.
* FIX reuse len_cv instead of recalculating it
* FIX Prevent adding *SearchCV estimators from the old grid_search module
* re-FIX In all_estimators: the sorting to use only the 1st item (name)
    To avoid collision between the old and the new GridSearch classes.
* FIX test_validate.py: Use 2D X (1D X is being detected as a single sample)
* MAINT validate.py --> validation.py
* MAINT make the submodules private
* MAINT Support old cv/gs/lc until 0.19
* FIX/MAINT n_splits --> get_n_splits
* FIX/TST test_logistic.py/test_ovr_multinomial_iris:
    pass predefined folds as an iterable
* MAINT expose BaseCrossValidator
* Update the model_selection module with changes from master
  - From #5161
  -  - MAINT remove redundant p variable
  -  - Add check for sparse prediction in cross_val_predict
  - From #5201 - DOC improve random_state param doc
  - From #5190 - LabelKFold and test
  - From #4583 - LabelShuffleSplit and tests
  - From #5300 - shuffle the `labels` not the `indxs` in LabelKFold + tests
  - From #5378 - Make the GridSearchCV docs more accurate.
  - From #5458 - Remove shuffle from LabelKFold
  - From #5466(#4270) - Gaussian Process by Jan Metzen
  - From #4826 - Move custom error / warnings into sklearn.exception

Minor
-----

* ENH Make the KFold shuffling test stronger
* FIX/DOC Use the higher level model_selection module as ref
* DOC in check_cv "y : array-like, optional"
* DOC a supervised learning problem --> supervised learning problems
* DOC cross-validators --> cross-validation strategies
* DOC Correct Olivier Grisel's name ;)
* MINOR/FIX cv_indices --> kfold
* FIX/DOC Align the 'See also' section of the new KFold, LeaveOneOut
* TST/FIX imports on separate lines
* FIX use __class__ instead of classmethod
* TST/FIX import directly from model_selection
* COSMIT Relocate the random_state documentation
* COSMIT remove pass
* MAINT Remove deprecation warnings from old tests
* FIX correct import at test_split
* FIX/MAINT Move P_sparse, X, y defns to top; rm unused W_sparse, X_sparse
* FIX random state to avoid doctest failure
* TST n_splits and split wrapping of _CVIterableWrapper
* FIX/MAINT Use multilabel indicator matrix directly
* TST/DOC clarify why we conflate classes 0 and 1
* DOC add comment that this was taken from BaseEstimator
* FIX use of labels is not needed in stratified k fold
* Fix cross_validation reference
* Fix the labels param doc

FIX/DOC/MAINT Addressing the review comments by Arnaud and Andy

COSMIT Sort the members alphabetically
COSMIT len_cv --> n_splits
COSMIT Merge 2 if; FIX Use kwargs
DOC Add my name to the authors :D
DOC make labels parameter consistent
FIX Remove hack for boolean indices; + COSMIT idx --> indices; DOC Add Returns
COSMIT preds --> predictions
DOC Add Returns and neatly arrange X, y, labels
FIX idx(s)/ind(s)--> indice(s)
COSMIT Merge if and else to elif
COSMIT n --> n_samples
COSMIT Use bincount only once
COSMIT cls --> class_i / class_i (ith class indices) -->
perm_indices_class_i

FIX/ENH/TST Addressing the final reviews

COSMIT c --> count
FIX/TST make check_cv raise ValueError for string cv value
TST nested cv (gs inside cross_val_score) works for diff cvs
FIX/ENH Raise ValueError when labels is None for label based cvs;
TST if labels is being passed correctly to the cv and that the
ValueError is being propagated to the cross_val_score/predict and grid
search
FIX pass labels to cross_val_score
FIX use make_classification
DOC Add Returns; COSMIT Remove scaffolding
TST add a test to check the _build_repr helper
REVERT the old GS/RS should also be tested by the common tests.
ENH Add a tuple of all/label based CVS
FIX raise VE even at get_n_splits if labels is None
FIX Fabian's comments
PEP8
2015-10-23 17:28:08 +02: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
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