Commit Graph

49 Commits

Author SHA1 Message Date
Kyle Kastner b2d6a30aeb IncrementalPCA implementation 2014-09-22 13:12:29 -04:00
Gael Varoquaux 05e65a655d TEST: fix test failing due to numeric instability 2014-07-14 20:47:18 +02:00
sdenton4 b70a481430 FIX: More robust test_extmath.py, compatible with older numpy 2014-04-17 11:09:11 -04:00
Lars Buitinck fb795ebef0 ENH factor out squared norm helper 2014-04-08 23:02:54 +02:00
Lars Buitinck eb7e86a7eb TST don't run fast_dot tests on numpy>=1.7.2 + pep8 2014-03-30 12:04:33 +02:00
Gael Varoquaux 20b87f9dce TST: test utils.extmath more robust 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
dengemann 3a6c0344e9 ENH: more of this 2013-11-29 13:55:39 +01:00
dengemann d2f3a8a3da ENH: refactor warnings 1 2013-11-29 13:55:38 +01:00
dengemann 5055836043 STY: tuple for Gael 2013-11-29 13:55:38 +01:00
dengemann 4d01a77a69 FIX: unintended assignment to ValueError 2013-11-29 13:55:38 +01:00
dengemann 642cbb2a69 MAINT: use stable blas getter API 2013-11-25 19:16:58 +01:00
Mathieu Blondel 9162dd5018 More robust unit tests for fast_dot. 2013-11-09 18:21:50 +09:00
Mathieu Blondel 8143e40656 BUG: ValueError was assigned as local variable! 2013-11-09 13:40:09 +09:00
Lars Buitinck 311172e31a TST fix still broken test_fast_dot
On Travis, SciPy seems to raise AttributeError instead of ValueError.
2013-10-20 20:45:57 +02:00
Lars Buitinck c14a619de6 TST fix broken fast_dot test
Due to a misspelling ("get_blas" vs. "get_blas_funcs") and a bare except
clause, the tests weren't actually being run.
2013-10-20 19:17:26 +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
balu b0de2e3f5b fix visual indentation 2013-08-31 12:28:28 +05:30
dengemann f91fba2f01 ENH: restrict fast_dot to np < 1.8 2013-08-25 11:16:22 +02:00
dengemann 1322da977c ENH/FIX: address @ogrisel comments 2013-08-25 11:16:21 +02:00
dengemann b86f3d5208 ENH: add new Warning class, improve tests, update docs 2013-08-25 11:16:21 +02:00
dengemann 69fc2970e7 FIX: remove spurious test 2013-08-25 11:16:21 +02:00
dengemann 5a3a432a79 ENH: return np.dot if ndim does not match 2013-08-25 11:16:21 +02:00
dengemann e98d1ccf42 FIX: workaround for missing BLAS 2013-08-25 11:16:21 +02:00
dengemann 67ceee1137 COSMITS 2013-08-25 11:16:20 +02:00
dengemann bf1655104e better handling of warning in test 2013-08-25 11:16:20 +02:00
dengemann eeaa6e1634 FIX: fix test warning 2013-08-25 11:16:20 +02:00
dengemann 3f3fb83c3d FIX: avoid zero-dvision warnings 2013-08-25 11:16:20 +02:00
dengemann 19e0401c12 employ DataConversionWarning 2013-08-25 11:16:20 +02:00
dengemann 2240e44f31 ENH: add fast_dot function 2013-08-25 11:16:20 +02:00
Lars Buitinck 74ec752e3c ENH speed up logistic_sigmoid (using less code)
Timings, before:

>>> x = np.linspace(-1000, 1000, 10000)
>>> %timeit logistic_sigmoid(x)
1000 loops, best of 3: 570 us per loop

After:

>>> %timeit logistic_sigmoid(x)
1000 loops, best of 3: 286 us per loop

For comparison:

>>> %timeit np.tanh(x)
10000 loops, best of 3: 117 us per loop
>>> %timeit .5 * (1 + np.tanh(x/2.))
1000 loops, best of 3: 301 us per loop

TODO: optimize log_logistic_sigmoid.
2013-07-28 16:44:13 +02:00
Vlad Niculae e488649af4 ENH Add fast and stable logistic sigmoid to utils and RBM 2013-07-24 17:27:22 +02:00
Robert Layton dacfd8bd5d DOC: Replaced all BSD style licenses with "BSD 3 clause"
Replaced all BSD style licenses with "BSD 3 clause"
Not checked yet!

Removed duplicate "3 clause, 3 clause"

Removed trailing period if exists

Fixed some missed licences, still about 50 to do, but those can be automated

Think I got the last of them.

Apparently me and sed have different ideas of regex.

Found a few more
2013-04-30 08:34:46 +02:00
Lars Buitinck 541987802f P3K range vs. xrange 2013-02-14 02:05:35 +01:00
Vlad Niculae 5b948bbcf3 TEST flipped svd remains correct 2012-12-24 15:04:36 +01:00
Vlad Niculae 641d0a7e5b Cannot easily ensure non-uniqueness without the fix, just test uniqueness 2012-12-24 15:03:49 +01:00
Vlad Niculae 5aed364db5 svd_flip test fails on Travis. Change random seed, see if it helps 2012-12-24 15:03:49 +01:00
Vlad Niculae 160648d8cc Make sure svd_flip test actually tests something 2012-12-24 15:03:49 +01:00
Vlad Niculae 0755f156f8 Add sign flip as flag in randomized_svd 2012-12-24 15:03:49 +01:00
Vlad Niculae 9ca8f7e60a Test more seeds for svd sign flipping 2012-12-24 15:02:24 +01:00
Vlad Niculae 0df8fb20ba Add failing test and no-op flip 2012-12-24 15:02:24 +01:00
Andreas Mueller 754c2d9533 COSMIT pep8 2012-12-22 16:48:17 +01:00
Peter Prettenhofer 6f08ae6760 added test for cartesian 2012-11-10 13:48:35 +01:00
Andreas Mueller 3c854a2fef COSMIT pep8 2012-10-31 15:36:03 +00:00
Mathieu Blondel a2cd5fa94c Fix density utility when input is sparse. 2012-10-19 16:53:36 +09:00
Mathieu Blondel e69acb1619 Add common assertions to sklearn.utils.testing.
The goal is to have all assertions conveniently in one place.
2012-10-19 16:43:19 +09:00
Mathieu Blondel 83bfb4a467 Merge exthmath tests into the same file. 2012-10-19 16:31:01 +09:00