Commit Graph

1772 Commits

Author SHA1 Message Date
Naoya Kanai bd0fc236e0 [MRG+1] MAINT drop SciPy < 0.13 (#8854)
Remove sklearn.utils.fixes functions that are not needed for scipy >= 0.13 and keep deprecated wrappers in other modules.
2017-06-02 23:36:33 +02:00
Guillaume Lemaitre 92cb166647 [MRG] DOC Homogeneous deprecation in docstring (#8907)
Update developers doc to use "deprecated" sphinx directive.
2017-05-23 08:42:08 +02:00
Guillaume Lemaitre 4c33ea2ee0 [MRG+1] EHN/DOC Make error msg about Memory more explicit (#8865) 2017-05-17 22:51:16 +10:00
Michele Lacchia 0301e06b19 DOC: add missing default value in LinearRegression docstring (#8873)
* DOC fix typos in linear_model.rst

* Another typo

* DOC: add missing default value in LinearRegression docstring and fix typo
2017-05-15 13:53:05 +02:00
chkoar 3a9b3f5e6a DOC Fix user guide link in MultiTaskElasticNetCV docstring (#8880) 2017-05-15 07:38:22 +10:00
aivision2020 6e8ebdac4e [MRG+1] FIX bug where ransac is running too many iterations (#8271) 2017-04-30 07:57:23 +10:00
Guillaume Lemaitre e3c9ae204f [MRG+1] DOC improve description and consistency of random_state (#8689)
* DOC improve description of random_state in train_test_split

* DOC Make random_state consistent through documentation

* FIX reverse doc mistake

* FIX address comment of Tom

* DOC address comments

* DOC remove empty line

* DOC remove unecessary white spaces
2017-04-05 17:43:21 -07:00
Guillaume Lemaitre f14c07d014 DOC removed deprcated residues_ (#8691) 2017-04-04 08:58:48 +10:00
Samuël Weber ec4def81d9 [DOC] Modify default normalize from False to True for some linear model (issue #1650) (#8640) 2017-03-30 07:12:22 -04:00
Lee Murray d196ea3cc5 [MRG] DOC: improve docstring form 'normalize' (#8658)
* DOC: improve docstring form 'normalize'

* DOC: improve docstring for 'normalize'

* fix double backticks in coordinate descent

* add missing path reference

* fix line lengths

* align language in docstring across files in linear_model
2017-03-30 11:19:21 +02:00
Arthur Mensch 5147fd09c6 Add SAGA solver for LogisticRegression and Ridge (#8446) 2017-03-27 21:39:30 +02:00
Ramana Subramanyam eba8a6a66c Improve warning message in ElasticNet (#8565) 2017-03-17 11:05:17 +01:00
gedeck 668a24c9e6 [MRG + 1] Return correct ridge parameter alpha_ and lambda_ for Bayesian ridge regression (#8567)
* Return correct ridge parameter alpha_ and lambda_ for regression

* Add test for coefficients and fix style

* Move sklearn.utils.testing to a more reasonable position.

* Make flake8 happy

* Code cleanup and entry in whats_new.rst
2017-03-16 10:22:58 +01:00
Rameshwar Bhaskaran 8c7ab1711d Added check_X_y to lasso_stability_path() (#7534) 2017-03-03 21:18:09 +01:00
josephsalmon 2709531e89 Fix doc Multitasks (#8473) 2017-03-02 10:18:23 +01:00
MarcoFalke e1ca40dd04 DOC Fix default value in RandomizedLasso (#8455) 2017-02-26 23:12:21 +11:00
Tahar 159da2a7c1 DOC fix MultiTaskElasticNet doc (#8442) 2017-02-24 00:06:31 +11:00
Ping-Yao, Chang f952e4355c [MRG+1] add docs that C can receive array in RandomizedLogisticRegression (#6537)
* doc: state that parameter C can receive an array

* add more details in doc, and check the dim of C

* doc: state that parameter C can receive an array

* add more details in doc, and check the dim of C

* a little modification

* minor modifications and make line length less than 79 characters

* remove the backslash and correct typos

* meet PEP8's E128 requirement

* use .format and add a test
2017-02-18 07:38:11 +01:00
Thierry Guillemot 05b5b37174 [MRG+1] Fix description of l1_ratio for MultiTaskElasticNet (#8343)
* Fix l1_ratio documentation of MultiTaskElasticNet.

* Update l1_ratio doc of MultiTaskElasticNetCV
2017-02-13 17:23:11 +01:00
Aman Dalmia 38d59c7b5a [MRG+2] ENH: used SelectorMixin in BaseRandomizedLinearModel (#8263)
* ENH: used SelectorMixin in BaseRandomizedLinearModel

* FIX: added get_support to return _get_support_mask

* FIX: added docstring for get_support()

* DOC: added bug fix entry to whats_new

* FIX: removed redundant get_support()
2017-02-13 13:10:18 +01:00
Vivek Kumar c45f52c218 DOC Updated documentation for scoring parameter (#8346)
Updated documentation for scoring parameter of LogisticRegressionCV to make it consistent with GridSearchCV documentation. Fixes #8333
2017-02-13 21:28:53 +11:00
Stephen Hoover 3a0ea190c5 [MRG+1] Accept keyword parameters to hyperparameter search fit methods (#8278)
* ENH Accept keyword parameters to hyperparameter search fit methods

Deprecate ``fit_params`` as a constructor argument to the hyperparameter search classes and instead accept keyword parameters to the ``fit`` methods. This makes the ``fit`` methods of these functions conform to the Estimator API and allows the use of hyperparameter search functions in other CV utility functions such as ``cross_val_predict``.

* CR: Expanded tests, remove deprecated use in Ridge

* Make tests consistent in Python 2 and 3
2017-02-09 07:42:23 +01:00
Aman Dalmia c5bcdde895 TST: added test that sample_weight can be a list (#8261) 2017-02-03 18:54:30 +11:00
Ekaterina Krivich be305cebaf TST/FIX Add check for estimator: parameters not modified by `fit` (#7846)
ensure that estimators only add private attributes and attributes with
  trailing _

  in cases when existing estimators don't follow this new rule, we deprecate the
  attributes and make them follow this rule
2017-01-20 11:33:17 +11:00
CJ Carey 08772c42e7 FIX Ensure coef_ is an ndarray when fitting LassoLars (#8160)
* Fix gh-1615: ensure self.coef_ is an ndarray
2017-01-18 21:44:28 +11:00
CJ Carey 2a1408a71d fixing typo in cs_mse_path_ deprecation (#8176) 2017-01-09 08:40:37 +11:00
Loïc Estève 8998856406 Fix Ridge floating point instability (#8154) 2017-01-07 21:47:16 +11:00
mthorrell d0ce0d9b38 [MRG+2] Avoid failure in first iteration of RANSAC regression (#7914)
Fixes #7908 

Adds RANSACRegressor attributes n_skips_* for diagnostics
2017-01-05 14:30:00 +11:00
Thierry Guillemot fcb706a7c0 [MRG+3] Fused types for MultiTaskElasticNet (#8061)
* Convert ElasticNet Multioutput to floating.

* Remove all the float64 coordinate_descent.

* Add the necessary cblas for use fused types.

* Fix zeros dtype issue in cd_fast.

* Remove cblas files.

* Change random seed to let test_lle_simple_grid pass.

* Add tests to check floatting issue for MultiTaskElasticNet.

* Update cblas_sscal.c
2016-12-28 11:31:38 +01:00
Gael Varoquaux b8450c8f23 DOC: Fix the documentation of scoring LogisticCV (#8099) 2016-12-22 12:14:26 +11:00
John Wei 5ce43f6eda DOC Fix output shape in doc for OrthogonalMatchingPursuit (#8091) 2016-12-20 22:06:15 +11:00
Sebastian Raschka 04087bd677 DOC clarify logisticregression n_jobs param (#8083) 2016-12-20 21:00:37 +11:00
Loïc Estève e542efafe2 TST Ensure that attributes ending _ are not set in __init__ (#7464) 2016-12-12 21:57:43 +11:00
Andreas Mueller 5c4b1bb231 [MRG+1] Housekeeping Deprecations for v0.19 (#7927)
* remove stuff to be removed 0.19

* more changes

* remove classes from 0.19 whatsnew

* remove _LearntSelectorMixin

* remove ProjectedGradientNMF, load_lwf_*

* minor fixes

* remove more copy from logistic regression path

* remove lda, qda from __init__.__all__

* remove pg solver in nmf from tests etc

* remove class_weight="auto" from tests

* doctest change for decision_function_shape="ovr"

* remove transfrom from tree test, minor fixes to tree tests

* some fixes in the tests

* undo changes in functions which still allow 1d input...

* also allow 1d in scale

* more test fixes...

* last test fixes in forest and tree

* svm default value change doctest failures

* pep8

* remove more class_weight="auto" stuff

* minor cosmetics in docstrings deprecated / removed behavior.

* say that store_covariance has been moved to __init__ in discriminant_analysis
2016-12-09 12:43:38 -05:00
Kathy Chen 04b67e2bcd [MRG+1] Fix estimators to work if sample_weight parameter is pandas Series type (#7825)
* addressed comments in the PR about parameters in check_array

* update the test case for the evaluation of estimators with pandas series

* bug fix, need to check for *not* None explicitly

* updated with isinstance check if the documentation says there is acceptance of floats

* ran pep8 linter on modified files

* moving the test case to estimators_check

* add a predict function into the testing pandas.Series class

* avoid running anything beyond the newly added meta checks

* check if pandas is installed before running the specific test

* changed the order of the try-catch to check for sample_weight param beforehand

* pass on import error rather than printing something to std out

* improve test case naming and pd.Series check in the bad estimator class

* address a pep8 linter error with unused import

* pep8 warning disabled for potential unused import

* throw a warning when SkipTest is raised

* add a SkipTestWarning

* updated the whats_new.rst with this issue

* rebase and fix a spacing issue
2016-12-03 15:56:22 -05:00
He Chen 1995994f86 added random_state=0 to many instances (#7968) 2016-12-02 22:01:20 +01:00
Sergey Feldman 67a85b8ed8 [MRG+2] Adding return_std options for models in linear_model/bayes.py (#7838)
* initial commit for return_std

* initial commit for return_std

* adding tests, examples, ARD predict_std

* adding tests, examples, ARD predict_std

* a smidge more documentation

* a smidge more documentation

* Missed a few PEP8 issues

* Changing predict_std to return_std #1

* Changing predict_std to return_std #2

* Changing predict_std to return_std #3

* Changing predict_std to return_std final

* adding better plots via polynomial regression

* trying to fix flake error

* fix to ARD plotting issue

* fixing some flakes

* Two blank lines part 1

* Two blank lines part 2

* More newlines!

* Even more newlines

* adding info to the doc string for the two plot files

* Rephrasing "polynomial" for Bayesian Ridge Regression

* Updating "polynomia" for ARD

* Adding more formal references

* Another asked-for improvement to doc string.

* Fixing flake8 errors

* Cleaning up the tests a smidge.

* A few more flakes

* requested fixes from Andy

* Mini bug fix

* Final pep8 fix

* pep8 fix round 2

* Fix beta_ to alpha_ in the comments
2016-12-01 10:52:18 -05:00
Joel Nothman 8570622a44 [MRG+1] DOC insert spaces before colons in parameter lists (#7920)
* DOC insert spaces before colons in parameter lists

Complies with numpydoc to improve rendering and automatic quality
assurance such as #7793. Affects listings of Parameters Attributes,
Returns.

Performed with the help of:

    grep -nE '^(    )+[a-zA-Z][a-zA-Z0-9_]*: ' sklearn -R | grep -v -e
    externals -e tests | grep -v -e default: -e else: -e Warning: -e Note:
    -e TRAIN: -e Default: -e True: -e False: -e DOI: -e In: | gsed
    's|\([^:]*\):\([0-9]*\):\([^:]*\):\(.*\)|--- a/\1\n+++ b/\1\n@@ -\2,1
    +\2,1 @@\n-\3:\4\n+\3 :\4|' | git apply --unidiff-zero -

* DOC fix numpydoc format for param
2016-11-25 10:59:22 +01:00
Loïc Estève e5bf61eee1 [MRG+1] Dropping python 2.6 support (#7890)
* Remove Python 2.6 support

Some details about some slightly orthogonal changes:
* Note about cheking safely for nan is likely not valid any more (commit
  introducing it is c80ca91b)
* scipy.linalg.qr econ parameter removed since scipy 0.9 in favour of
  mode='economic'
* Remove unnecessary libgfortran in conda create command

* Putative fix by setting the random seed

* Revert unintended change

* Reinstate previous logic for checking for NaNs

* Reinstate change in error message

Error messages from Python 2.7 assertRegexp does not contain the
function name, in contrast with Python 3 assertRegex
2016-11-23 17:11:04 -05:00
Thierry Guillemot 915458bb71 Fix RandomState in the tests of linear model. (#7881) 2016-11-15 19:30:13 +01:00
jmontoyam 5230382ae6 [MRG + 1] Fix numerical instability in LassoLars when alpha=0 (#7778) (#7849)
* Fix bug 7778

* Add test_lasso_lars_vs_R_implementation

* Add a space to match the indentation

* Solve E501 line too long (80 > 79 characters)

* assert_array_almost_equal up to 12 decimals

* Tiny modification for increasing performance

* Update what's new page

* Trying to solve conflicts

* Solve conflict in doc/whats_new.rst
2016-11-11 19:01:29 -08:00
Raghav RV 31ee1a8e6e [MRG + 2] FIX LogisticRegressionCV to correctly handle string labels (#5874)
* TST if LogisticRegressionCV handles string labels properly
* TST Add a test with class_weight dict
* ENH Encode y and class_weight dict
* Better variable names
* TYPO casses --> classes
* FIX Use dict comprehension; classes_labels --> classes
* Revert dict comprehension (for Python 2.6 compat)
* MNT reorder validation to improve clarity
* Add whatsnew entry
2016-11-09 21:40:51 +01:00
Karan Desai db3c0959f6 [MRG+1] Warning raised by MultiTaskElasticNet.fit is now ConvergenceWarning. (#7806)
* Warning raised by MultiTaskElasticNet.fit is now ConvergenceWarning.
2016-11-03 15:42:33 +01:00
Loïc Estève 6a2d8d5bbc [MRG+2] BUILD Rewrite setup.py files to handle cython dependencies (#7719)
* Rewriting of cythonization in setup.py

By using Cython.Build.cythonize and switching between .c and .pyx files
as appropriate cython dependencies are correctly taken into account.

* Use cythonize once on the root config rather than in each subpackage

* Fix for Windows

* Remove caching from Travis

Cython dependencies are taken care of by Cython.Build.cythonize and
based on file timestamps, so .C and .so files will always be rebuild
from scratch on each build in Travis.

* Specify .pyx in setup.files for cython generated extensions

More natural this way. Tweak the extensions to generate from .c and .cpp
files for a release.

* COSMIT Remove commented out code

* Check cython version is greater than 0.23

* COSMIT better names for functions

* flake8 fix (imported module not at top of file)

* Install cython 0.23 for Python 2.6

now that cython >= 0.23 requirement is enforced in setup.py

* Use module constant for minimum required cython version

* Fix Travis install.sh

No easy way to put comments inside multi-line command
2016-11-02 22:57:04 +11:00
nuffe 0dfc9a5167 [MRG + 1] ElasticNetCV: raise ValueError if l1_ratio=0 (#7591)
Raise ValueError if l1_ratio=0 in ElasticNetCV and alphas=None
2016-10-25 10:07:02 +02:00
chkoar 7892edd3f8 Address #7733 - MultiTaskElasticNet user guide links to MultiTaskLasso (#7741) 2016-10-24 19:31:49 -04:00
Mathieu Blondel f122efa151 Fix typo in OMP author name.
First author is Stéphane Mallat.
2016-10-23 17:54:58 +09:00
Ishank Gulati cee48cdf8f removed cv_ prefix (#6252) 2016-10-08 10:27:41 +09:00
Artem Golubin 36e67a91af Fix test suites (#6348) 2016-10-07 19:47:43 -04:00
Konstantin Podshumok 9b2aac9e5c [MRG + 1] [TST] (half-cosmetic) use less nose.tools import to simplify future transition to py.test (#7384)
* use less nose.tools import to simplify future transition to activly developing test suites/runners

* assert_equal -> assert_array_equal in test_feature_hasher_pairs_with_string_values

and one missed ImportError that should be replaced with AttributeError

* test for py2.6 compat with except AttributeError

* fix importing of SkipTest

* force using nose in python2.6 for now

* there was no assert_dict_equal in py2.6. but we can use assert_equal

although failed test will look a little bit ugly

* remove nose imports from doc/datasets
2016-10-07 12:46:52 -04:00