Commit Graph

299 Commits

Author SHA1 Message Date
topisan 3379e90f6d DOC return_X_y for load diabetes (#14762) 2019-08-24 23:17:01 -04:00
qdeffense f13c9c0752 CLN remove redundant default parameters in examples and tests (#14590)
remove redundant 'fit_intercept=True' in examples and tests along with some instances of other redundant parameters (max_iter=100, C=1 and alpha=1.0)
2019-08-07 10:38:41 -07:00
barrycg 58e8a43b60 Use r_squared instead of explained_variance in plot_ols.py (#14562) 2019-08-05 13:19:55 -04:00
Harsh Mahajan 228109cd5c MAINT Remove tolerance paramter from Perceptron (#14558) 2019-08-02 16:11:46 -04:00
Harsh Mahajan 38fd24ac1e EXA Remove redundant tol parameter for SGDClassifier (#14556) 2019-08-02 14:04:10 -04:00
Sourav Singh f8e4cc495a ENH Add return_X_y to 20_newsgroups and olivetti_faces (#14259) 2019-07-20 10:30:09 +08:00
Tilen Kusterle a8efe00876 EXA Use return_X_y=True with load_digits where appropriate (#14359) 2019-07-14 17:10:54 +02:00
Archana Alva 40b2a6c7e3 EXA Removing redundant parameters assignment in examples (#14360) 2019-07-14 22:26:41 +08:00
Jon Cusick 9f84658efb DOC Include `use_line_collection` argument (#14326) 2019-07-13 11:35:05 -05:00
Kennedy Kang'ethe 1dc7b1d84a DOC Add use_line_collection=True to plt.stem to remove warning (#14146) 2019-06-25 16:12:08 +02:00
loopyme 8342548ae1 EXA Remove useless sections in omp example (#14019) 2019-06-11 12:21:23 +02:00
Guillaume Lemaitre c28ef9ef2a DEP change the default of multi_class to 'auto' in logistic regression (#13807) 2019-05-22 09:57:15 -04:00
c56pony 57c04f4e8d ENH Allows setting of initial hyperparameters for BayesianRidge (#13618) 2019-05-22 11:36:30 +10:00
Guillaume Lemaitre 7896b21562 MNT change default of solver in LogisiticRegression (#13805) 2019-05-08 21:31:39 +08:00
mathurinm ffc63c6508 EXA Use stem plot for ElasticNet and Lasso coefficients (#13435) 2019-03-17 09:38:04 +11:00
surgan12 62d2059804 MNT remove __future__ imports (#12791) 2019-02-02 22:05:06 +08:00
Adrin Jalali 69c8967e21 DOC Fix warnings in examples (#12654)
Fixe or suppresses many warnings in examples, including matplotlib complaining about the non-gui backend.
2019-01-17 21:41:13 +11:00
Rohan Lekhwani e0697b01a7 MNT Used scipy.special.expit for the inverse of the logit function (#12931) 2019-01-08 18:35:19 +11:00
Nicolas Hug c1f58745be [MRG] Add elastic net penalty to LogisticRegression (#11646)
* First draft on elasticnet penaly for LogisticRegression

* Some basic tests

* Doc update

* First draft for LogisticRegressionCV.

It seems to be working for binary classification and for multiclass when
multi_class='ovr'. I'm having a hard time figuring out the intricacies
of multi_class='multinomial'.

* Changed default to None for l1_ratio.

added warning message is user sets l1_ratio while penalty is not
elastic-net

* Some more doc

* Updated example to plot elastic net sparsity

* Fixed flake8

* Fixed test by not modifying attribute in fit

* Fixed doc issues

* WIP

* Partially fixed logistic_reg_CV for multinomial.

Also added some comments that are hopefully clear.
Still need to fix refit=False

* Fixed doc issue

* WIP

* Fixed test for refit=False in LogisticRegressionCV

* Fixed Python 2 numpy version issue

* minor doc updates

* Weird doc error...

* Added test to ensure that elastic net is at least as good as L1 or L2
once l1_ratio has been optimized with grid search

Also addressed minor reviews

* Fixed test

* addressed comments

* Added back ignore warning on tests

* Added a functional test

* Scale data in test... Now failing

* elastic-net --> elasticnet

* Updated doc for some attributes and checked their shape in tests

* Added l1_ratio dimension to coefs_paths and scores attr

* improve example + fix test

* FIX incorrect lagged_update in SAGA

* Add non-regression test for SAGA's bug

* FIX flake8 and warning

* Re fixed warning

* Updated some tests

* Addressed comments

* more comments and added dimension to LogisticRegressionCV.n_iter_ attribute

* Updated whatsnew for 0.21

* better doc shape looks

* Fixed whatnew entry after merges

* Added dot

* Addressed comments + standardized optional default param docstrings

* Addessed comments

* use swapaxes instead of unsupported moveaxis (hopefully fixes tests)
2018-11-21 20:23:57 -05:00
^__^ 6c5f285a32 EXA Fix comment in plot-iris-logistic example (#12564) 2018-11-12 09:33:42 +08:00
Xing Han Lu 5df8cd3bd7 EXA Fix title, overlapping plots and axis labels in plot_ols_ridge_variance.py (#12296) 2018-10-09 21:44:57 +08:00
Hanmin Qin a3616f65dc MNT Use name instead of float to specify colors (#12199) 2018-10-01 16:32:42 +02:00
Olivier Grisel fc7d6e6986 [MRG] Fix FutureWarnings in logistic regression examples (#12114)
* Be more specific about logistic regression solver in examples

* Use early stopped SGD (faster) and plot cross-validated error for best models

* Fix LR solver in /plot_voting_probas.pyexamples/ensemble/plot_voting_probas.py

* Fix LR solver & scale data in plot_digits_classification_exercise.py

* Use saga solver in plot_logistic_l1_l2_sparsity.py

* Use LBFGS solver in plot_iris_logistic.py

* Use LBFGS in plot_logistic.py

* Use SAGA solver for Logistic Regression Path example

* Use LBFGS solver in plot_classifier_chain_yeast.py

* Use LBFGS solver in plot_rbm_logistic_classification.py

* typo

* typo

* Bump up pandas dependency to 0.17.1

* Bump up examples minimal deps to match pandas 0.17.1

* Fix figure layout for plot_digits_pipe.py

* Version numbers are not decimal numbers

* Set multinomial, no scaling to keep example simple, fix formatting of example doc

* Missing plt.tight_layout() in plot_voting_probas.py

* Missing plt.tight_layout() in plot_logistic.py
2018-09-24 18:22:40 +01:00
Hanmin Qin 8890b50606 [MRG+1] EXA Set cv=5 in examples (#11856)
* EXA Set cv=5 in examples

* small mistake

* [doc build]

* [doc build]

* cross_val*

* [doc build]

* [doc build]
2018-08-20 15:22:42 -04:00
Hanmin Qin 4d7d410ed2 EXA Use fetch_openml(returnX_y=True) (#11855) 2018-08-20 09:02:52 +10:00
Joel Nothman fc56da504d Deprecate fetch_mldata (#11466)
* API Deprecate fetch_mldata and update examples
* Use pytest's filterwarnings
* Rm unused import
* Remove broken doctest
* Refer user to openml URL
* DOC whatsnew tweak
2018-08-18 19:27:48 +03:00
ZJ Poh adddf00433 [MRG] np.ones -> np.full (#11628) 2018-07-23 09:49:01 +02:00
Tom Dupré la Tour 0fc7ce6bb8 [MRG+1] Add a stopping criterion in SGD, based on the score on a validation set (#9043) 2018-07-05 16:25:34 +02:00
cwitte 2ccc946157 [MRG+1] DOC changed plotting of SGD penalties to improve clarity (#10574) 2018-02-07 23:54:36 +11:00
Hristo cb41c52625 Remove unused variable alphas from the LARS example. (#9882) 2017-10-07 17:04:08 +02:00
syonekura 32fcc364ab [MRG+1] Setting max_iter/tol explicitly for SGD estimators in docs (#9776) 2017-10-04 17:28:32 +02:00
Hanmin Qin 32ac22870d [MRG+1] Fix warnings in lgtm.com (remove redundant code) (#9719) 2017-09-14 11:42:58 +02:00
Sebastin Santy e33e84dbf7 [MRG] FIX Examples use int / int without __future__.division (#9426) 2017-07-23 12:11:49 +10:00
Ramana Subramanyam c10c88622a Deprecate randomized_l1 (#9031) 2017-06-30 18:20:25 +02:00
Tom Dupré la Tour edeb3af217 Deprecate n_iter in SGDClassifier and implement max_iter (#5036) 2017-06-23 21:49:29 +02:00
plagree 1f6ac72df7 [MRG] DOC examples with correct notebook style (#9061)
* DOC examples with correct notebook style

* Modifications in examples/ to avoid unwanted notebook style

* Remove last notebook style example

* Space formatting to avoid notebook style
2017-06-20 14:48:57 +02:00
Aarshay Jain 6986e9b5db [MRG + 1] 18 more examples with matplotlib 2.0 updates (#8983)
* updated plot_label_propagation_versus_svm_iris.py plot

* updated svm/plot_weighted_samples.py plot

* made semi_supervised/plot_label_propagation_versus_svm_iris.py pep8 compliant

* modified tree/plot_tree_regression.py [size and edgecolor]

* updated tree/plot_tree_regression_multioutput.py [size+color]

* fixed examples/semi_supervised/plot_label_propagation_versus_svm_iris.py for backward compatibility

* neural_networks/plot_mlp_alpha.py - matplotlib2 update

* examples/neural_networks/plot_mlp_alpha.py - pep8 fix

* examples/neighbors/plot_nearest_centroid.py - matplotlib2.0 + pep8 fix

* neighbors/plot_classification.py - matplotlib2.0 + pep8 fix

* examples/neighbors/plot_lof.py - matplotlib2.0 update

* examples/model_selection/plot_underfitting_overfitting.py - matplotlib2.0 + pep8

* examples/mixture/plot_concentration_prior.py - matplotlib2.0 + pep8

* examples/linear_model/plot_logistic_multinomial.py - matplotlib2.0 update

* linear_model/plot_sgd_iris.py - matplotlib2.0 + pep8 fix

* examples/linear_model/plot_sgd_weighted_samples.py - matplotlib2.0 + pep8

* examples/linear_model/plot_sgd_separating_hyperplane.py - matplotlib2.0 update

* examples/feature_selection/plot_permutation_test_for_classification.py - matplotlib + pe8

* examples/linear_model/plot_bayesian_ridge.py - matplotlib2.0 update

* examples/feature_selection/plot_feature_selection.py - matplotlib2.0 update

* examples/feature_selection/plot_f_test_vs_mi.py - matplotlib2.0 + pep8

* examples/feature_selection/plot_f_test_vs_mi.py - matplotlib2.0+ pep8 fix

* examples/model_selection/plot_underfitting_overfitting.py - error fixed

* blue -> black edgecolor fix for 2 examples
2017-06-07 13:23:12 +02:00
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
Loïc Estève 719afba518 [MRG] Run more examples as part of the doc generation (#8851)
Also fix errors and flake8 violations of existing examples
2017-05-11 23:42:57 +02:00
Arthur Mensch 5147fd09c6 Add SAGA solver for LogisticRegression and Ridge (#8446) 2017-03-27 21:39:30 +02:00
David Robles 0ab5c678bb Save predictions in diabetes_y_pred (#8241)
- No need for `regr.predict(diabetes_X_test)` to run multiple times.
- Use `sklearn.metrics.mean_squared_error`.
- Use `sklearn.metrics.r2_score`, instead of `regr.score`, which
  runs `regr.predict` again.
2017-02-27 23:06:26 +01:00
Nelle Varoquaux 9b75a81b2d [MRG] FIX lasso/elasticnet example did not add noise to simulated data. (#8427)
The first argument of np.random.normal is the mean of the distribution, and
not the output shape. The example thus did not add noise but only an intercept
to the model.
2017-02-22 14:54:32 +01:00
akshay0724 b705cb811d [MRG] loss function plot y-label slightly confusing (#8283)
* Correct y label in plot

* Remove Space
2017-02-06 21:10:44 +11:00
Aman Dalmia 13cc121b30 [MRG] Remove DeprecationWarnings in examples due to using floats instead of ints (#8040) 2017-02-03 15:21:03 +01:00
Rishikesh 15fddab163 Cosmetic changes to rigde path example (#8260)
Change the name of ridge object clf to ridge and also
reinstantiate ridge in every iteration.

Issue: https://github.com/scikit-learn/scikit-learn/issues/8256
2017-02-01 13:13:12 +01:00
Andreas Mueller b6d39793d0 [MRG] make the ransac example slightly more terse, improve range of plot (#8258) 2017-02-01 08:31:07 +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
Deborah Gertrude Digges 3c18735503 [MRG+2] logit -> logistic in plot_logistic.py and minor visual improvements to the plot. (#7730)
* Small correction of logit->logistic

The function `1 / (1 + np.exp(-x))` is the logistic function. 
The logit function is the inverse of the logistic function : `log(x/(1-x))`

* Add axes ticks, legend and colors to the plot

* Fix flake8 errors

* Rename legend labels as per review

* Fix pep8 error
2016-10-25 10:19:57 +02:00
Ishank Gulati cee48cdf8f removed cv_ prefix (#6252) 2016-10-08 10:27:41 +09:00
Shota e2a2b4d403 Fix typos (#6942) 2016-06-27 18:13:49 +02:00