Commit Graph

60 Commits

Author SHA1 Message Date
seales 0485ada58b General spelling fixes 2015-12-16 09:46:42 -08: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
Andreas Mueller 31a5a5ff12 Fixed warnings for DataDimensionalityWarning, decision_function and decision_function_shape. 2015-10-14 15:38:07 -04:00
Vighnesh Birodkar 735dd1fdca Fix warnings during tests 2015-10-08 14:52:21 -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
Ganiev Ibraim 617baa1b13 Style fix 2015-08-24 23:33:17 +03:00
Ganiev Ibraim af587ec768 Removed unnecessary class checks 2015-08-23 16:30:53 +03:00
Ganiev Ibraim 088ee0ebcd deleted useless assert 2015-08-13 23:26:11 +03:00
Ganiev Ibraim 78bd87b021 OneClassSVM sparsity regression test added 2015-08-08 22:03:59 +03:00
Andreas Mueller 6d4bcda876 ENH refactor OVO decision function, use it in SVC for sklearn-like decision_function shape 2015-06-05 13:14:45 -04:00
Andreas Mueller b1ddbf4695 Fixes to sparse decision_function, rebase fixes. 2015-03-26 11:44:39 -04:00
Rob Zinkov 0dc37f5f73 Adding sparse support for decision function
Adding test for decision_function on sparse matrices

Fixing typos

Fix Memory Leak

PEP8 fixes

COSMIT PEP8

Fixed class_weight_label problem

Fixed label problem in tests

renamed label_ to classes_

Fixed OneClass bug

Adding kernel tests for sparse matrices

Pass dense data to decision function

Don't check precomputed kernel

use safe_sparse_dot in test, regenerate cython

create a core-dump by testing the binary case... hurray?
2015-03-26 11:35:36 -04:00
Raghav R V cd2ee7e454 MAINT docstring --> comments to prevent nose from using doc in verbose mode 2015-03-21 11:16:49 +05:30
MechCoder 94bda65a75 FIX: Remove raw_coef_ attribute that eats up memory 2014-07-18 12:06:35 +02:00
mjbommar 724b63a16c Replacing the test .todense() methods with .toarray() 2014-05-20 21:44:34 -04:00
dengemann 3a6c0344e9 ENH: more of this 2013-11-29 13:55:39 +01:00
Vlad Niculae d65de5e76c Fix libsvm seed when predict_proba in tests and examples 2013-07-27 19:50:25 +02:00
Vlad Niculae 89a58cdcad FIX support random state in libsvm 2013-07-27 19:50:25 +02:00
Vlad Niculae f2643c87e1 Add failing test for libsvm random state proba 2013-07-27 19:50:25 +02:00
Gael Varoquaux 62cd4a295c COMPAT: no assert_warns in np 1.3 2013-07-27 16:52:43 +02:00
Andreas Mueller 5a1fde1194 COSMIT fixing some unused imports, adding stuff to __all__, and light pep8 (not all whitespace to make rebasing less painful) 2013-07-27 15:44:17 +02:00
Arnaud Joly 1fb634c627 FIX warning test 2013-07-27 15:01:51 +02:00
Andreas Mueller db6f00514a TST FIX random state for LibLinear sparse tests 2013-03-03 18:24:54 +01:00
Lars Buitinck 6bf4c90c5d ENH sparsify method for L1-reg linear models
Currently implemented on LinearSVC, LR and SGD.
2013-02-23 12:11:56 +01:00
Rob Zinkov 418b6a1155 Adding test to check support_ is equal in dense and sparse matrices 2013-02-02 17:06:52 +01:00
Lars Buitinck 7267e4e308 COSMIT rm deprecated svm.sparse module 2013-01-22 02:15:56 +01:00
Andreas Mueller c75dd39fba FIX sort indices in CSR matrix for SVM 2013-01-17 16:56:54 +01:00
Andreas Mueller 754c2d9533 COSMIT pep8 2012-12-22 16:48:17 +01:00
Andreas Mueller 33899d0bca ENH make sparse svm test more robust, catch warning on deprecated class 2012-11-25 18:59:54 +00:00
GaelVaroquaux 370e3ca0da BUG: dot on sparse matrices broken in recent numpy 2012-11-06 09:20:59 +01:00
Daniel Nouri 3d1c8fbef9 Improve svm.base test coverage: 92% -> 98% 2012-11-03 16:48:14 +01:00
James Bergstra 159fb129de ENH: assert -> assert_equals 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 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 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
Andreas Mueller 1c1ea99b74 DOC added some comments to the sparse precomputed kernel tests. 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 31af7521d5 ENH support custom kernels on sparse matrices 2012-09-03 11:02:13 +02:00
Gael Varoquaux fead9ace75 COSMIT: only classes should have capitals 2012-05-06 18:48:20 +02:00
Andreas Mueller eeb6dcc4cc ENH use random states everywhere, never call np.random. 2012-05-06 18:35:14 +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
Andreas Mueller 868eac134f Merge branch 'master' into svm_class_weights
Conflicts:
	doc/modules/svm.rst
	doc/tutorial.rst
	doc/whats_new.rst
	sklearn/linear_model/logistic.py
	sklearn/svm/base.py
	sklearn/svm/classes.py
	sklearn/svm/sparse/classes.py
	sklearn/svm/tests/test_sparse.py
	sklearn/svm/tests/test_svm.py
2012-02-15 00:12:02 +01:00
Alexandre Gramfort ad8e4912cb TST: use assert_true instead of assert + remove some relative imports 2012-02-11 15:43:03 +01:00
Alexandre Gramfort f0dc6116ad API: set scale_C to True by default in libsvm/liblinear models 2012-02-11 14:42:47 +01:00
Andreas Mueller 0e8312312b ENH: moved class_weight parameter in svms from fit to ``__init__``. 2012-02-07 00:24:02 +01:00
Lars Buitinck 41ba56fdb2 ENH merge sparse and dense SVMs, part 3: adapt sparse tests 2012-01-27 17:41:25 +01:00
Lars Buitinck 0b0bcfc311 ENH merge dense/sparse LinearSVC, part 4: deprecate sparse.LogisticRegression 2012-01-16 21:34:55 +01:00
Lars Buitinck 9b0fbab0d1 ENH merge dense/sparse LinearSVC, part 3: deprecate sparse.LinearSVC 2012-01-16 18:27:14 +01:00