Commit Graph

119 Commits

Author SHA1 Message Date
Taehoon Lee bdb00d17b9 Fix typos in test_covariance.py and extmath.py (#8997) 2017-06-06 16:54:51 +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
Clement Joudet 6252f99c16 [MRG+1] Fixing Math domain error on NMF due to numpy.dot (#8765)
* Fixing overflow error on NMF due to numpy.dot
2017-05-20 09:47:43 +02: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
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 0847c92678 Replace ConvergenceWarning by RuntimeWarning (#7922)
when cumsum is unstable.
2016-11-24 12:05:44 +01:00
yangarbiter fa59873857 [MRG+1] FIX unstable cumsum (#7376)
* FIX unstable cumsum in utils.random

* equal_nan = true for isclose
since numpy < 1.9 sum is as unstable as cumsum, fallback to np.cumsum

* added axis parameter to stable_cumsum

* FIX unstable sumsum in ensemble.weight_boosting and utils.stats

* FIX axis problem in stable_cumsum

* FIX unstable cumsum in mixture.gmm and mixture.dpgmm

* FIX unstable cumsum in cluster.k_means_, decomposition.pca, and manifold.locally_linear

* FIX unstable sumsum in dataset.samples_generator

* added docstring for parameter axis of stable_cumsum

* added comment for why fall back to np.cumsum when np version < 1.9

* remove unneeded stable_cumsum

* added stable_cumsum's axis testing

* FIX numpy docstring for make_sparse_spd_matrix

* change stable_cumsum from error to warning
2016-10-17 15:49:23 +02:00
Olivier Grisel d9bd30e2f7 FIX use == to avoid relying on string interning 2016-09-14 16:02:49 +02:00
Joel Nothman 49d126fd8f [MRG + 1] FIX use high precision cumsum and check it is stable enough (#7331)
* FIX use high precision cumsum and check it is stable enough
2016-09-09 06:17:12 +02:00
Andreas Mueller 4a72792db4 change default iterated_power to auto. 2016-09-06 11:03:16 +02:00
Andreas Mueller 927f00ca9a fix warning and behavior in randomized_svd wrt power iterations 2016-09-06 11:03:16 +02:00
Alexandre Gramfort 7ae7ea5ea8 pep8 2016-05-09 22:55:48 +02:00
Jordi a4d070e9cd [MRG] Disabled randomized_svd warning when number of iterations is not specified #6746 (#6749) 2016-05-09 22:54:35 +02:00
giorgiop 328ebfa865 ENH RandomizedPCA collapsed into PCA 2016-03-11 09:10:37 +11:00
dsquareindia cfa498ca68 FIX in randomized_svd flip sign
Flip sign according to `u` in both cases of `transpose`.
2016-02-08 16:59:44 +01:00
MechCoder 729be74708 Use row_norms in f_regression 2016-01-10 11:04:09 -05:00
giorgiop f45f260ff7 DOC versionadded randomized_svd 2015-10-21 18:28:37 +02:00
giorgiop b18f2951e4 randomized_svd: power iter, normalization, benchmark 2015-10-21 11:21:40 +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
Olivier Grisel 6fe94b57f2 Merge pull request #4478 from amueller/fix_randomized_svd_transpose
[MRG] Fix randomized_svd transpose heuristic.
2015-10-15 13:39:46 +02:00
Andreas Mueller 838570cc8a Fixes #4455. 2015-10-13 17:44:36 -04:00
giorgiop 6a5a2f7960 partial_fit for scalers 2015-10-13 11:37:00 +02:00
Manoj Kumar cb591e1d3e Merge pull request #5225 from MechCoder/fix_overflow
[MRG + 1] Add numerically stable softmax function to utils.extmath
2015-09-09 11:47:35 -04:00
Vighnesh Birodkar 2f099334f9 MAINT deprecate 1d input arrays for all estimators
Passing 1D arrays to check_array, without setting `ensure_2d` to false now
raises a deprecation warning before reshaping it. This will later throw an
error.

All Scaler classes also throw warnings when 1D arrays are passed.

All unit tests/doctests are modified to ensure that no 1D arrays are passed,
except in explicit 1D array tests where the warnings have been silenced.

Additional tests are also included which check for different 1D array cases.

2D array tests with one samples and one features are also added and where
they failed, `check_array` call has been modified to give a more useful error
message
2015-09-09 15:49:58 +02:00
MechCoder f08963bd4f Add numerically stable softmax function to utils.extmath 2015-09-08 17:04:52 -04:00
Andreas Mueller 6beacc3fb6 remove deprecated stuff from 0.17 2015-03-18 14:49:04 -04:00
Hasil Sharma 3c3360d408 FIX Make Spectral Embedding deterministic 2015-02-26 09:07:57 +01: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
Kyle Kastner b2d6a30aeb IncrementalPCA implementation 2014-09-22 13:12:29 -04:00
Stefan van der Walt f5300d1b5e ENH Speed up and simplify cartesian product 2014-09-04 15:27:25 +02:00
MechCoder 9e58bcdfad DOC: Added np.sqrt since default is 'squared=False' 2014-08-26 15:42:22 +02:00
Lars Buitinck 56057c9630 MAINT remove deprecated code 2014-07-23 16:19:40 +02:00
Andreas Mueller 6e2a83b4e1 remove check_arrays stuff and old input validation 2014-07-20 13:31:45 +02:00
lesteve fa50e628dd Remove 'DeprecationWarning: using a non-integer number instead of an integer will result in an error in the future' warnings 2014-07-18 15:16:56 +01:00
Lars Buitinck fb795ebef0 ENH factor out squared norm helper 2014-04-08 23:02:54 +02:00
Manoj-Kumar-S bbb8f1d1bf Moved sparsefuncs to sparsefuncs_fast 2014-03-27 13:20:45 +05:30
Lars Buitinck baae60b95d MAINT remove useless import 2014-03-02 23:44:10 +01:00
Lars Buitinck 23b3cc2eb5 MAINT drop support for SciPy < 0.9
TODO: get rid of solve_triangular. Just replacing it by scipy.linalg's
breaks OMP and least-angle regression.
2014-03-02 20:13:57 +01:00
Lars Buitinck b97fb3c5fc MAINT drop support for NumPy < 1.6.1 2014-03-02 20:13:57 +01:00
Lars Buitinck fd54575111 ENH re-instate extmath.logistic_sigmoid
For backward compat only, so immediately deprecated.
2014-02-23 17:47:03 +01:00
Lars Buitinck 0ba1e28cd5 ENH speed up RBM training with scipy.special.expit
SciPy 0.10 already has an implementation of the logistic function called
scipy.special.expit.

Using this makes RBM training 12% faster, as measured by observing the time
per iteration as reported by the plot_rbm_logistic_classification.py example,
disregarding the first iteration as an outlier (it's consistently faster than
the rest, not sure why). The speedup is in the expit function, not the
inplace operations; those are there to make benchmarking easier, but they
certainly won't hurt.
2014-02-23 17:46:53 +01:00
Joel Nothman dbc26ce996 COSMIT remove unused imports and variables 2014-02-03 19:43:56 +11:00
Lars Buitinck 5f3f794069 MAINT refactor fast_dot
* check for NumPy >= 1.7.2 at import time, instead of in every call;
* save a function call when newer NumPy is available;
* rewrote documentation;
* put the docstring on fast_dot instead of _fast_dot;
* remove spurious warnings for matrix-vector multiplications (some of these
  are suboptimal with older np.dot, but the good ones were triggering a
  warning as well).
2013-12-29 20:11:58 +01:00
Mathieu Blondel 112befd2bd Simplify fast_dot. 2013-11-10 20:28:15 +09:00
Mathieu Blondel 9162dd5018 More robust unit tests for fast_dot. 2013-11-09 18:21:50 +09:00
Mathieu Blondel c0e686b74a COSMIT: no need for parentheses. 2013-11-09 13:47:55 +09:00
Mathieu Blondel 8143e40656 BUG: ValueError was assigned as local variable! 2013-11-09 13:40:09 +09:00
Lars Buitinck 551b6c2f06 ENH honor Y_norm_squared when X=Y in euclidean_distances
Also a micro-optimization to row_norms.
2013-10-13 18:54:21 +02:00
Lars Buitinck 24af95a211 ENH refactor squared-norms computation to extmath
k-means can now use the memory-efficient dense implementation from
metrics.pairwise, while pairwise can use the fast sparse implementation
from k-means.
2013-10-12 20:27:51 +02:00
Lars Buitinck edf747e6a2 DOC docstring for extmath.norm 2013-10-12 20:17:33 +02:00