Commit Graph

4545 Commits

Author SHA1 Message Date
Scott Andrews f241f5f14e Fixed issue #5830, capitalization in advanced installation documenation 2016-09-12 18:31:04 -04:00
Joel Nothman c726085e20 DOC mention true positives etc in confusion matrix docs (#7392) 2016-09-12 12:22:41 -04:00
Jiyuan Qian e1b5d601a2 MLP bug fixes with random state and loss, removed decision_function, and added test 2016-09-12 11:37:39 +02:00
Olivier Grisel b966b44585 DOC fix class.rst for Label / Group CV tools 2016-09-12 09:06:44 +02:00
Raghav RV 9a12555e6d [MRG+1] ENH/MNT Rename labels --> groups in CV tools (#6660) 2016-09-11 19:14:41 +02:00
jblackburne ba7cf38f99 Removed isclose from _binary_clf_curve. (#7353)
Added a bugfix report to whats_new.rst. Modified a unit test to check for the kind of problems caused by isclose.
2016-09-11 12:48:32 +10:00
Olivier Grisel a86fd7f5e7 Add Dirichlet process prior to BayesianGaussianMixture (#7386) 2016-09-10 15:41:52 +02:00
Ruifeng Zheng 105d03314c [MRG+1] Add hyperlink and example for kappa (#7214) 2016-09-10 15:34:35 +02:00
Andreas Mueller 31a4691d76 [MRG+1] fix sampling in stratified shuffle split (#6472)
Fix sampling in stratified shuffle split, break tests that test sampling.
2016-09-09 19:00:49 +02:00
Gael Varoquaux 4b2304f05a Merge pull request #7261 from betatim/negative-scorers
[MRG + 2] Rename scorers like `mse` to `neg_mse`
2016-09-08 20:40:17 +02:00
Andreas Mueller 2c4b43c289 change installation description to not discourage people from installing scipy or numpy with pip. (#7313) 2016-09-08 10:09:56 +02:00
Andreas Mueller 6972d6c15c DOC minor doc fixes for sphinx. (#7357) 2016-09-08 10:07:40 +10:00
Andreas Mueller 680ab517df [MRG + 2] remove complicated equality checks in clone as __init__ shouldn't touch anything. (#5540)
* BF: issue 5522 (cloning objects with pandas.Dataframe attributes)

* super conservative fix, pending GP and VBGMM fixes.

* TST improved test for df param

* add deprecation warning, add whatsnew entry

* fixed place of deprecation warning, added test for deprecation warning.

* pep8

* fix whitespace error
2016-09-08 10:07:11 +10:00
b0noI a03db89eba [MRG+1] Support of the collections.Sequence type has been added to the _check_param_grid method from model_selection. (#7323)
* Support of the collections.Sequence type has been added to the _check_param_grid method from model_selection.

* test_grid_search_when_param_grid_includes_range test was refactored (parts that are not nessesary have been removed).

* test_grid_search_bad_param_grid now checks that value is not string. This is important since string is a Sequence.

* _check_param_grid now checks is the type is not string together with the check for other types.

* whats_new.rst has been updated to include information about bug fix for bug #7322.

* Description of the fix for the bug #7322 has been updated.

* Fix for indented in model_selection._search.py.
2016-09-07 17:06:44 -04:00
Raghav R V 4dbab2680e results_ --> cv_results_; "test_mean_score" --> "mean_test_score" et al. 2016-09-06 18:46:09 +02:00
Olivier Grisel 5daee9627d DOC fix iterated_power='auto' in doctests 2016-09-06 11:11:07 +02:00
Olivier Grisel b9d16b26a8 Merge pull request #7342 from themrmax/pydotplus-decision-tree-plotting
change decision tree example to use pydotplus
2016-09-06 10:05:16 +02:00
Joel Nothman d20170884e DOC move changelog heading to correct place 2016-09-06 10:26:42 +10:00
Brandon Carter 3dcfb564a0 [DOC] add release dates for each version on whats_new page (#7225) 2016-09-06 10:23:20 +10:00
themrmax fed401c831 change decision tree example to use pydotplus for compatibility with Python 3 2016-09-05 14:45:57 +10:00
Tim Head f4419a9f2a Small documentation fix 2016-09-04 17:21:54 +02:00
Olivier Grisel ccad485dd0 Merge pull request #7316 from totalgood/doc-clf-reg-patch
[MRG + 1] fix regressor var name
2016-09-01 08:59:58 +02:00
Tim Head 88a395abb3 Link to mean_squared_error function
Makes the distinction between the metric and the scorer a bit
easier for the reader.
2016-09-01 08:16:24 +02:00
Jimmy Jia 62978154ba BLD: Add 'alldeps' extra for installing with pip (#6990)
This allows advanced users who are using standard Python package
management tools to install scikit-learn[alldeps], which includes the
appropriate numpy and scipy dependencies.
2016-09-01 09:51:03 +10:00
Hobson Lane b4661b1b56 colon 2016-08-31 15:45:01 -07:00
Hobson Lane 6787da493d make it clear that linear_model.Perceptron is a classifier 2016-08-31 15:41:56 -07:00
Hobson Lane 2ab7e34e95 clf = Perceptron 2016-08-31 15:27:00 -07:00
Hobson Lane 9f65998376 fix regressor var name
clf = short for classifier
reg = short for reggression/regressor/regression_model
2016-08-31 14:33:09 -07:00
Olivier Grisel c931bf0603 FIX #7293: StandardScaler.with_mean in preprocessing doc 2016-08-31 14:08:56 +02:00
Thierry Guillemot f0862f7af3 [MRG+1] Bayesian Gaussian Mixture (Integration of GSoC2015 -- second step) (#6651)
* Add the new BayesianGaussianMixture class.
Add the test file for the BayesianGaussianMixture.

* Add the use of the cholesky decomposition of the precision matrix.

* Fix some bugs.

* Modification of GaussianMixture class.

The purpose here is to prepare the integration of BayesianGaussianMixture.

* Fix comments.

* Modification of the Docstring.

* Add license and author.

* Fix pb typo of eq 10.64 and 10.62.

* Correct VBGMM bugs.

* Fix full version.

* Fix the precision normalisation pb.

* Fix all cov_type algo for BayesianGaussianMixture.

* Optimisation of spherical and diag computation.

* Code simplification.

* Check the Gaussian Mixture tests are ok.

* Add test.

* Add new tests for BayesianGaussianMixture and GaussianMixture.

* Add the bayesian_gaussian_example and the doc.

* Fix comments.

* Fix review comments and add license and author.

* Fix test compare covar type.

* Fix reviews.

* Fix tests.

* Fix review comments.

* Correct reviews.

* Fix travis pb.

* Fix circleci pb.

* Fix review comments.

* Fix typo.

* Fix comments.

Add reg_covar and what's new.

* Fix comments.

* Fix comments.

* [ci skip] Correct legend.
2016-08-30 19:02:30 +02:00
srvanrell e2648b18e5 classes parameter renamed to labels in hamming_loss() 2016-08-30 22:30:18 +10:00
Joel Nothman 0a0bf2478e Revert "ENH: Add indicator features to imputer output (#6607)" (#7292)
This reverts commit 18396be8cb as it was
merged when incomplete.
2016-08-30 21:28:01 +10:00
Loïc Estève 4566251618 [MRG+3] Add flake8 linting of the diff in Travis (#7127)
* Add flake8 linting on the diff

with respect to common ancestor of branch and scikit-learn/scikit-learn
remote.

Add a flake8-diff target in the Makefile and mention it in the doc.

* Only install flake8 when needed
2016-08-30 12:59:57 +10:00
Joel Nothman 5b20d484ad [MRG] ENH enable setting pipeline components as parameters (#1769)
Pipeline and FeatureUnion steps may now be set with set_params, and transformers may be replaced with None to effectively remove them.

Also test and improve ducktyping of Pipeline methods
2016-08-29 23:32:42 +10:00
Gael Varoquaux 1e2b4436f2 MAINT/DOC: pngmath deprecated for sphinx >= 1.4 (#7279)
Fix #7222
2016-08-29 11:43:41 +02:00
Nelson Liu 3250f15967 [MRG + 1] Rebased navbar fix (#7202)
* Fixed the documentation item on the navbars alignment.

* Added z-index to the navbar so it doesn't get covered by page headers
2016-08-29 11:36:16 +02:00
Preston Parry b8b31ddb09 [DOC] Capitalizes "C/C++" from "c/c++" (#7273)
* Capitalizes "C/C++" from "c/c++"

* found another "c/c++" in the same file
2016-08-29 08:21:11 +10:00
Preston Parry 58b35d8b9f DOC Updates sklearn naming convention for consistency (#7268)
* Updates sklearn naming convention for consistency

* minor grammar fix

* clarifies source of string vs. function cosine
2016-08-29 08:20:13 +10:00
Tim Head ef64969f91 Introduce deprecation warning and fix tests
get_scrorer now warns if you use an old name for a scorer
and tests have been updated to use new naming convention.
2016-08-27 14:56:40 +02:00
Tim Head 9b2e53e8d5 Rename smaller-is-better scoring metrics
Rename scorers like MSE to neg_MSE so that it is less
surprising that they return negative values.
2016-08-27 12:06:07 +02:00
Nelson Liu acf8368ca3 [MRG + 1] doc: specifically address reinforcement learning in faq (#6479)
* doc: specifically address reinforcement learning in faq

* doc: grammar fix

* doc: edit wording about RL GPU requirements

* edit wording and rerun CI
2016-08-27 11:29:43 +02:00
Ganiev Ibraim b3e122a0b5 [MRG+2] parallelized VotingClassifier and sample_weight support (#5805)
* parallelized VotingClassifier

* rename list to list_ to avoid problems

* Added new tests for sample_weight, multithreading and multiprocessing

* assert_equal -> assert_array_equal

* Fixed sample_weight existence check and test_sample_weight

* Code is clearer now

* Tests refactoring, 'backend' parameter removed

* Tests indentation fix

* reverted parallel predict and predict_proba to single threaded version

* what's new section added

* minor fixes

* check for sample_weight support in underlying estimators added

* newline at the end of test
2016-08-26 14:41:21 +10:00
Yen a7d748b1de Rename `TimeSeriesCV` to `TimeSeriesSplit` (#7245)
* rename TimeSeriesCV to TimeSeriesSplit

* Add TimeSeriesSplit

* Add whats new
2016-08-26 12:34:33 +10:00
Nelson Liu d97a25fc3b
Wrap up changes to fix log_loss bug and clean up log_loss
fix a typo in whatsnew

refactor conditional and move dtype check before np.clip

general cleanup of log_loss

remove dtype checks

edit non-regression test and wordings

fix non-regression test

misc doc fixes / clarifications + final touches

fix naming of y_score2 variable

specify log loss is only valid for 2 labels or more
2016-08-25 10:01:38 -07:00
Mads Jensen 79406f4f07
fixed error message when y_pred and y_test labels don't match
fixes as per existing pull request #6714

fixed log_loss bug

enhance log_loss labels option feature

log_loss

changed test log_loss case

u

add ValueError in log_loss

fixes as per existing pull request #6714

fixed error message when y_pred and y_test labels don't match

fixed error message when y_pred and y_test labels don't match

corrected doc/whats_new.rst for syntax and with correct formatting of credits

additional formatting fixes for doc/whats_new.rst

fixed versionadded comment

removed superfluous line

removed superflous line
2016-08-25 09:53:09 -07:00
Yen 084ef97f16 [MRG+2] ElasticNet and Lasso now support float32 dtype input (#6913)
ElasticNet and Lasso no longer implicitly convert float32 dtype input to float64 internally.

* Make helper functions in cd use fused types

* Import cblas float functions

* Make enet_coordinate_descent support fused types

* Make dense case work

* Refactor format

* Remove redundant change

* Add cblas files

* Avoid redundant code

* Remove redundant c files and import

* Recover unnecessary change

* Update comment

* Make coef_ type consistent

* Test float32 input

* Add user warning when fitting float32 data with small alpha

* Fix bug

* Change variable to floating type

* Make cd sparse support fused types

* Make CD support fused types when data is sparse

* Add referenced src files

* Avoid duplicated code

* Avoid type casting

* Fix indentation in test

* Avoid type casting in sparse implementation

* Fix indentation

* Fix duplicated intialization code

* Follow PEP8

* Raise tmp precision to double

* Add 64 bit computer check

* Fix test

* Add constraint

* PEP 8

* Make saxpy have the same structure as daxpy

Hopefully this fixes the problems outlined in PR #6913

* Remove wrong hardware test

* Remove dsdot

* Remove redundant asarray

* Add test for fit_intercept

* Make _preprocess_data support other dtypes

* Add concrete value

* Workaround

* Fix error msg

* Move declarartion

* Remove redundant comment

* Add tests

* Test normalize

* Delete warning

* Fix comment

* Add error msg

* Add error msg

* Add what's new

* Fix error msg
2016-08-25 09:36:39 -07:00
Yen 234d25677d [MRG] Add homogeneous time series cross validation (#6586) 2016-08-24 23:15:38 +10:00
David Staub 277b058713 [MRG] Remove heavy memory footprint in BaseBagging due to OOB scoring (#7118)
* Remove heavy memory footprint for OOB scoring from bagging.

- Remove `estimators_samples` attribute from `BaseBagging`
- Add method `_get_estimators_samples` to `BaseBagging` that
  returns a generator producing sample indices on demand.
- Slight refactor of `_parallel_build_estimators()` to
  isolate and group lines accessing random state.

* Replaced `BaseBagging.estimators_samples_` attribute with property.

- Accessing `BaseBagging.estimators_samples_` now triggers call to
  `BaseBagging._get_estimators_samples` as well as deprecation
  warning for release 0.20.
- This should make the fix for the OOB memory issue fully backwards
  compatible.

* Remove print statement.

* Added test, made new method more general.
- Added test to `test_bagging.py` to ensure that indices generated
  on the fly are identical to indices generated at fit time.
- Refactored `_get_estimators_samples()` to `_get_estimators_indices()`,
  now both feature and samples indices are returned.
- Refactored `estimators_samples_()` to deal with above.

* Rename index generating functions and arguments.

* `estimators_samples_()` returns list instead of generator

* Removed `estimators_samples_` deprection warning.

* Actually removed `estimators_samples_` deprecation warning.

* New mask generation function, new bagging test, new BaseBagging attributes.
- Added new private function in bagging.py that converts indices to
  a boolean mask.
- Added new bagging test to make sure identical OOB scores are generated
  when the same estimator if fit with fixed random state and identical
  training data.
- Added new private attributes `BaseBagging._max_features` and
  `BaseBagging._max_samples` to store validated input values.

* Streamlined code, improved `estimators_samples_()` documentation.
- Removed `max_samples` argument from `_parallel_build_estimators()`,
  this value is now accessed via `ensemble._max_samples`.
- Removed validation of `ensemble.max_features` and `max_samples`,
  instead use `ensemble._max_features` and `ensemble._max_samples`
  which are assumed to be already validated.
- Removed unnecessary `samples` variable from `_parallel_build_estimators()`.
- Changed the way `random_state` is generated in `_parallel_build_estimators()`
  and `BaseBagging._get_estimators_data_draws()` to direct numpy method to
  reflect that seeds created in `BaseBagging._fit()` are trustworthy.
- Due to above removed generation of new seed for each estimator in
  `_parallel_build_estimators()` and `BaseBagging._get_estimators_data_draws()`.
- Added documentation to `BaseBagging.estimators_samples_()` property
  indicating the reason it's generated dynamically and the associated performance
  penalty.
- Returned `BaggingClassifier._set_oob_score()` and `BaggingRegressor._set_oob_score()`
  to directly accessing `self.estimators_samples_`.

* Streamlined code, improved `estimators_samples_()` documentation.
- Removed `max_samples` argument from `_parallel_build_estimators()`,
  this value is now accessed via `ensemble._max_samples`.
- Removed validation of `ensemble.max_features` and `max_samples`,
  instead use `ensemble._max_features` and `ensemble._max_samples`
  which are assumed to be already validated.
- Removed unnecessary `samples` variable from `_parallel_build_estimators()`.
- Changed the way `random_state` is generated in `_parallel_build_estimators()`
  and `BaseBagging._get_estimators_data_draws()` to direct numpy method to
  reflect that seeds created in `BaseBagging._fit()` are trustworthy.
- Due to above removed generation of new seed for each estimator in
  `_parallel_build_estimators()` and `BaseBagging._get_estimators_data_draws()`.
- Added documentation to `BaseBagging.estimators_samples_()` property
  indicating the reason it's generated dynamically and the associated performance
  penalty.
- Returned `BaggingClassifier._set_oob_score()` and `BaggingRegressor._set_oob_score()`
  to directly accessing `self.estimators_samples_`.

* PEP8, remove optional arguments, add public function to utils.
- Update indentation and line length to conform to PEP8.
- Update `estimators_samples_()` docstring to conform to PEP8 and
  PEP257.
- Remove optional arguments to `BaseBagging._get_estimators_data_draws()`,
  rename to `BaseBagging._get_estimators_indices()`.
- Remove optional arguments from `_generate_mask_from_indices()`,
  move to `utils.metaestimators`, rename to `indices_to_mask()`.

* Add indices_to_mask to __all__ in utils.metaestimators

* Move utils function, new test for `estimators_samples` correctness.
- Moved `indices_to_mask` from `utils.metaestimators` to `utils.validation`
- Added new test to `ensemble.test_bagging` to make sure refitting
  an individual estimator from the bagging ensemble using the corresponding
  samples identified in `BaseBagging.estimators_samples` returns the same model.

* Adjust/remove tests, move `indices_to_mask` to `utils.__init__`.
- Remove test_bagging.test_consistent_index_sampling
- Update formatting checks in test_bagging.test_estimators_samples
  to make sure each mask is numpy boolean array
- Move indices_to_mask from utils.validation to utils.__init__

* update class docstring for `estimators_samples_`

- Updated class docstring of `estimators_samples_` attribute for `BaggingClassifier` and `BaggingRegressor` to indicate that samples are identified with boolean masks.

* PEP8, made `max_samples` arg optional in _fit()
- Fixed PEP8 issues.
- Gave `max_samples` argument of `BaseBagging._fit()` a default
  value of `None` as indicated in the docstring. Added code to
  check for and process `None` value.
- Added a few more comments to `_fit()`.

* 2 new `max_samples` consistency tests, update whats_new.rst

* Minor change

* Update whats_new.rst
2016-08-23 16:59:32 +10:00
Alexandre Gramfort fa8fe859c4 update what's new + simplify test 2016-08-20 15:19:13 +02:00
Preston Parry 454b0f239a minor wording fix
Changes "the scikit" to "scikit-learn". While both might be technically accurate, explicitly calling the package "scikit-learn" helps with naming consistency.
2016-08-20 00:29:20 -07:00