Commit Graph

265 Commits

Author SHA1 Message Date
Lars Buitinck 0563fa9a51 BUG halve the number of LinearSVCs
np.random.randint can't handle the range [0..UINT_MAX] on platforms
with 32-bit long.
2012-10-28 21:27:14 +01:00
Lars Buitinck 8b6f28061d ENH allow more than 1000 linear SVMs with custom random seeds
Random seed now picked in the range [0..UINT_MAX] instead of [0..1000].

Also changed the liblinear helper code to conform to C89 again, allowing
compilation with MSVC.
2012-10-27 22:55:53 +02:00
Gael Varoquaux fc236b1441 TST: fix test counting warnings
Hackish fix that involves reseting the module-specific registry tracking
the number of calls to a warning (check the warnings' module source
code to understand)
2012-10-17 07:31:51 +02:00
Andreas Mueller 00be697425 FIX seed liblinear using srand. Fixes issue #919. 2012-10-16 21:13:38 +01:00
Andreas Mueller 7be6c2ce0e FIX two more docstrings. Sorry. 2012-10-16 20:05:27 +01:00
Andreas Mueller 51b06b8203 FIX doctests for max_iter 2012-10-16 16:46:48 +02:00
James Bergstra 159fb129de ENH: assert -> assert_equals 2012-10-16 16:13:00 +02:00
James Bergstra 7fab72d912 FIX: adding missing c files from cython 2012-10-16 16:13:00 +02:00
James Bergstra 4b8399b66b ENH: hint about data normalization when SVC stops early 2012-10-16 16:13:00 +02:00
James Bergstra 3c803daeb5 FIX: missing file hidden among the Cython output 2012-10-16 16:13:00 +02:00
James Bergstra 5d6540d054 ENH: renaming iter_limit -> max_iter 2012-10-16 16:13:00 +02:00
James Bergstra fb48f29429 ENH: Solver iter_limit emits warning instead of raising exception 2012-10-16 16:13:00 +02:00
James Bergstra 8fa79ee14d FIX: committing updated Cython-generated libsvm bindings 2012-10-16 16:13:00 +02:00
James Bergstra 812376955a ENH: adding iter_limit to libsvm
This commit adds support for a new libsvm parameter, which permits setting a
hard limit on the while loop in the svm.cpp file, in the Solver::Solve
function. Without this functionality, it has been observed that libsvm hangs
without converging in a reasonable time -- it can take days instead of
seconds, and perhaps it is in fact an infinite loop, I don't know.  This
commit allows the user to set a hard limit on the number of libsvm iterations,
and modifies the libsvm bindings to raise a new exception of SolverTimeout
when this limit is reached.
2012-10-16 16:13:00 +02:00
Lars Buitinck 77e69edcec COSMIT rm deprecated stuff -- lots of it 2012-09-20 21:40:33 +02:00
Andreas Mueller ea51101924 COSMIT remove unused imports 2012-09-18 19:34:53 +01:00
Lars Buitinck dc943722de COSMIT refactor linear classifiers
Factored out the common code to LinearSVC, LogisticRegression, Perceptron
and SGDClassifier into a LinearClassifierMixin.
2012-09-17 21:06:36 +02:00
Lars Buitinck 8a96ca1def ENH no more distinction between "sparse" and "dense" LinearSVC 2012-09-16 21:17:17 +02:00
Lars Buitinck 6f13021eac Merge pull request #1143 from larsmans/refactor-liblinear
Refactor liblinear bindings: rewrote prediction code in Python
2012-09-16 03:28:21 -07:00
Lars Buitinck 1e9f7efe55 COSMIT rm svm.sparse tests to prevent deprecation warnings 2012-09-15 14:52:42 +02:00
Lars Buitinck 3ed794e283 COSMIT comment out more unneeded liblinear code 2012-09-13 14:58:11 +02:00
Lars Buitinck 6fd64d48d0 COSMIT liblinear C code cleanup
Restore code to be slightly closer to upstream (still not possible to
run with the original library, though).

Comment out some more code that we don't use to reduce build time.
2012-09-13 00:32:46 +02:00
Lars Buitinck 706319655a ENH refactor liblinear prediction code and add classes_ member
Liblinear bindings removed from LinearSVC and LogisticRegression
prediction code in favor of NumPy code.

* no more copying of X at predict time
* no more unchecked malloc at predict time
* -4000 lines of C code
* simpler handling of coef_ and intercept_

Also, support symbolic class names and classes_ on both estimators.
2012-09-13 00:16:42 +02:00
Lars Buitinck 420a006361 COSMIT const and void* correctness in liblinear wrapper
Suppresses a few warnings during build.
2012-09-12 16:00:55 +02:00
Lars Buitinck f54c0bcded COSMIT use property.setter in sklearn.svm 2012-09-08 17:39:04 +02:00
Vlad Niculae 006e7ef801 Add __all__ for the second half of the scikit 2012-09-04 18:00:49 +01:00
Andreas Mueller 1c1ea99b74 DOC added some comments to the sparse precomputed kernel tests. 2012-09-03 11:02:14 +02:00
Andreas Mueller 254e15fa55 ENH fix error by removing unnecessary test. 2012-09-03 11:02:14 +02:00
Andreas Mueller 50a2d057ab FIX add exception, check exception, if sparse.SVC is called with kernel='precomputed' 2012-09-03 11:02:14 +02:00
Andreas Mueller a6a8771e0c MISC use assert instead of value error. 2012-09-03 11:02:14 +02:00
Andreas Mueller 79ebf6c088 ENH added low-level bail out in sparse svm 2012-09-03 11:02:13 +02:00
Andreas Mueller 31af7521d5 ENH support custom kernels on sparse matrices 2012-09-03 11:02:13 +02:00
Nelle Varoquaux 4631a2192b FIX sparse OneClassSVM was using the wrong parameter 2012-09-02 20:47:46 +02:00
Nelle Varoquaux 5954727b49 Deprecated sparse classes from the SVM module - refs #1093 2012-09-02 20:45:56 +02:00
Vlad Niculae 9e7c03f71a Add or fix deprecation schedule in warnings. 2012-09-01 20:02:14 +02:00
Andreas Mueller 42e9029a1e TST classifier behavior with only one class present 2012-08-27 13:36:43 +02:00
Andreas Mueller b797265ebf Merge branch 'fit_pairwise'
Conflicts:
	sklearn/cluster/tests/test_spectral.py
2012-08-27 10:39:24 +02:00
Francois Savard ceb0d8bb0a Added version info to deprecation warning 2012-08-22 18:01:03 -04:00
Francois Savard 7fb4fa359d Fixed docstring for C param in BaseLibLinear/SVM subclasses.
And added deprecation warning.
2012-08-22 16:05:14 -04:00
Andreas Mueller 5c3853cceb Merge branch 'master' into fit_pairwise 2012-08-05 14:44:05 +01:00
VirgileFritsch 68693b8f47 BF: adapt a svm test to recent numpy versions.
Use assert_raises((Exception1, Exception2), ...) syntax to catch
an exception that may vary according to numpy version.
2012-07-24 18:12:44 +02:00
Andreas Mueller 408d3ef86d COSMIT, removed scikits.learn things, removed orphan file. 2012-07-23 22:50:12 +01:00
Lars Buitinck 4a579f842c BUG remove predict{_log,}_proba from SVR
Also, swapped predict_proba and predict_log_proba docstrings on SVC classes.
2012-07-21 02:20:33 +02:00
Jaques Grobler 9ad5d3281d docstring fixes 2012-07-19 14:21:49 +02:00
Andreas Mueller 163d7772e2 ENH better input validation for prediction in SVC, LinearSVC. 2012-06-27 22:03:15 +02:00
Andreas Mueller 310a8cebd5 MISC raise NotImplementedError instead of value error in decision_function of sparse SVM 2012-06-26 14:16:04 +02:00
Andreas Mueller ee7d78ce47 Make sparse svm base class ABC 2012-06-26 14:16:04 +02:00
Andreas Mueller 26c31bf810 ENH make base classes abstract meta classes 2012-06-26 14:16:03 +02:00
Andreas Mueller 537911eafb MISC callable kernel gridsearch fix... 2012-06-22 22:25:03 +02:00
Andreas Mueller 37cadf03c0 Merge branch 'master' into fit_pairwise
Conflicts:
	sklearn/svm/base.py
2012-06-22 22:20:18 +02:00