Commit Graph

126 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
Andreas Mueller 00be697425 FIX seed liblinear using srand. Fixes issue #919. 2012-10-16 21:13:38 +01: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 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
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 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 f54c0bcded COSMIT use property.setter in sklearn.svm 2012-09-08 17:39:04 +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 31af7521d5 ENH support custom kernels on sparse matrices 2012-09-03 11:02:13 +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
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 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
Andreas Mueller 4e7d9962f6 ENH fixed doctests, addressed comments. 2012-06-15 19:31:47 +02:00
Andreas Mueller 028a33e3c3 MISC A bit more cleaning up in BaseLibSVM 2012-06-07 23:35:54 +02:00
Andreas Mueller 82d795fb4c MISC reduce code duplication, fix "self.gamma" modification 2012-06-07 23:28:02 +02:00
Andreas Mueller 6c21e254da FIX Fixing rebasing problems... 2012-06-03 20:44:32 +02:00
Andreas Mueller ac1fb004e7 ENH Cleanup 2012-06-03 20:39:02 +02:00
Andreas Mueller ef82d75c5b ENH going for a universal property ``_pairwise`` instead of many functions. 2012-06-03 20:39:02 +02:00
Andreas Mueller 5072bb07e3 DOC Deprecation warning with removal version 0.13. 2012-06-03 20:35:05 +02:00
Andreas Mueller a26edc4585 COSMIT forgot one print... 2012-06-03 20:35:05 +02:00
Andreas Mueller 89036689fb COSMIT get rid of debugging output 2012-06-03 20:35:05 +02:00
Andreas Mueller 37dbc5b1e6 ENH base svm has fit_pairwise and predict_pairwise. 2012-06-03 20:34:25 +02:00
Lars Buitinck ea2bacd91c ENH import liblinear 1.91
* Reapplied the sklearn-specific changes
* Put a slightly larger part of the upstream code in #if 0
2012-05-25 14:42:48 +02:00
Lars Buitinck c1a4b692cb DOC fixed sentence that was missing a verb 2012-05-21 11:47:11 +02:00
Gael Varoquaux 5bf5266eb2 ENH: make LinearSVC copyiable
Fixes #820
2012-05-06 19:04:19 +02:00
Alexandre Gramfort 4fbe9c67ea FIX : svm decision function test 2012-05-05 21:57:05 +02:00
Alexandre Gramfort 15455263b7 API : change back default C to 1. explicitely and epsilon 0.1 2012-05-05 21:57:04 +02:00
Andreas Mueller 4286188c49 MISC forgot two 2012-05-05 21:57:04 +02:00
Andreas Mueller 66d00f4748 MISC trying to remove scale_C 2012-05-05 21:57:04 +02:00
Alexandre Gramfort 89d73c7b1f FIX : sparse SVC clone with callable kernel 2012-04-21 18:08:15 +02:00
Alexandre Gramfort e00044c4e8 FIX : callable kernel for prediction 2012-04-21 08:39:06 +02:00
Alexandre Gramfort a13138aaa6 cosmit 2012-04-21 08:34:55 +02:00
Alexandre Gramfort 43571bc254 FIX : fix SVC pickle with callable kernel 2012-04-20 23:35:12 +02:00
GaelVaroquaux 4956c0004e MISC: verbosity in SVMs
Indicate which part of the code emmits the messages, to make it more
understandable as part of a bigger picture
2012-04-13 08:16:16 +02:00
Nicolas Pinto f172c7ef09 MISC: verbose should be int, not bool 2012-04-12 21:05:14 -04:00