Commit Graph

49 Commits

Author SHA1 Message Date
YenChenLin 22d7cd5cd0 Make dump_svmlight_file support sparse y 2016-03-24 01:22:48 +08:00
Chih-Wei Chang 82ea224dfa Add multilabel support for dump_svmlight_file. 2015-07-12 13:51:27 +08:00
Hsuan-Tien Lin eff590ab63 add another test case with empty labelset 2015-04-11 08:27:36 +08:00
Andreas Mueller 0a4c12f58a TST remove tempfiles that we create in svmlight tests and agglomerative clustering tests 2015-01-23 11:36:46 -05:00
Calvin Giles cf3d69be29 Moved code out of context block where not required for #3612 2014-08-31 17:30:16 +01:00
Calvin Giles dd9e512ddb Changed f=open() to with open() as f to eliminate ResourceWarnings. Fixes #3410. 2014-08-31 14:44:11 +01:00
mjbommar 724b63a16c Replacing the test .todense() methods with .toarray() 2014-05-20 21:44:34 -04:00
Joel Nothman dbc26ce996 COSMIT remove unused imports and variables 2014-02-03 19:43:56 +11:00
Olivier Grisel 0a8538ec77 FIX: test failure under windows caused by temp files handling 2013-12-23 16:28:50 +01:00
Lars Buitinck 119cc2407f BUG SVMlight loader should check whether n_features is big enough
scipy.sparse won't complain when it gets a dimensionality that is
too large, causing crashes in estimators.

Fixes #1630.
2013-11-25 19:09:43 +01:00
Lars Buitinck 8a0b317dd1 TST clean up after ourselves in SVMlight test
As spotted by @yarikoptic in #2553; also, the test was previously not
loading the bzip'd file.
2013-10-27 17:59:48 +01:00
Lars Buitinck 77695ee27a COSMIT pep8 2013-07-11 11:50:23 +02:00
Justin Vincent d420aafb0f TST + PY3 various fixes
* Little hack in fixes.py that can be removed when NumPy's
  https://github.com/numpy/numpy/issues/3484 is fixed.
* Little cleanup to the fixes implementation.
* Change the numpy workaround and added a test. Fixed some xrange usage.
* Fix the weight boosting test.
* None is not comparable in python3
* Fix a test that depended on dictionary iteration order.
* Python3 removed execfile
* More test fixes.

Fixes #2122.
2013-07-05 20:17:23 +02:00
Seamus Abshere ff0e88213f ENH reduce size of files produced by dump_svmlight_file 2013-04-16 12:14:58 +02:00
Steven De Gryze 461b58559a PY3 fixing utf8 comments in svm through try/except and six.b 2013-03-19 18:03:45 +01:00
Steven De Gryze 5993ef5082 PY3: use b() convenience function for string literals
Had to use an exception in lfw.py; six.u didn't work
2013-03-19 17:57:02 +01:00
Lars Buitinck 578034eccd TST sorting CSR matrix indices in SVMlight file handling 2013-01-17 17:11:04 +01:00
Lars Buitinck 49e9391168 BUG don't write comments in SVMlight dumper by default
Fixes part of Issue #1501
2013-01-16 17:19:23 +01:00
Mathieu Blondel 6eec2e651b Even more sklearn.utils.testing. 2012-10-26 00:09:46 +09:00
Andreas Mueller d50c0cb06c COSMIT pep8 2012-10-02 17:31:00 +01:00
Fabian Pedregosa 04b5e98400 Add support for query_id in dump_svmlight_file
Added a test and docstring
2012-09-29 10:19:07 +02:00
Fabian Pedregosa 58c1b5decd Add test for load_svmlight_files 2012-09-28 20:56:15 +02:00
Fabian Pedregosa 398fa9d136 FIX: query_id parameter and other cosmetic changes 2012-09-28 11:24:28 +02:00
Fabian Pedregosa 6fd39fbf12 Add support for preference contraints in svmlight format.
This feature is explained in http://svmlight.joachims.org/ and adds
the ability to control which pairs are considered when dealing with
pairwise loss functions (e.g. for SVMrank).

In order to preserve API compatibility, I return this information (if
present) as a second column to the y vector.
2012-09-26 17:48:13 +02:00
Lars Buitinck 6eb4bb3841 TST (near-)empty lines and explicit zeros in SVMlight loader 2012-09-05 15:39:57 +02:00
Mathieu Blondel 6f54691eb3 Check that feature indices are sorted. 2012-08-05 20:34:59 +09:00
Lars Buitinck 35b24cac4c ENH allow user-specified comment in SVMlight dumper 2012-07-23 10:46:18 +02:00
Lars Buitinck e1ba110829 ENH make generated SVMlight files self-describing in a comment
Comment is *not* used to parse the files, since that would break
compatibility with other tools; it's just there for the user.
2012-07-21 14:32:29 +02:00
Lars Buitinck 2530791e2e ENH better input validation for dump_svmlight_file
Also, do validation *before* opening any files.
2012-07-21 14:32:29 +02:00
Olivier Grisel 51661e7bb3 FIX #937: preserve double precision values in svmlight serializer 2012-07-07 20:14:58 +02:00
Lars Buitinck 669bbf2de1 BUG do not close fd passed by user in SVMlight loader
+ document the behavior of load_svmlight_file better
2012-06-13 16:31:39 +02:00
Lars Buitinck ddb7b4df81 ENH always support file descriptors in SVMlight loader
Previously only supported in Python 3.x
2012-06-11 14:11:50 +02:00
Lars Buitinck 4eedded8db ENH support opening compressed files in SVMlight reader 2012-06-04 10:50:51 +02:00
Lars Buitinck 96af5ae934 TEST + FIX zero_based="auto" behavior in SVMlight loader 2012-04-15 16:50:51 +02:00
Lars Buitinck 2ddf1a7b6d COSMIT pep8 SVMlight loader 2012-04-15 16:33:22 +02:00
Lars Buitinck 2c293ebc40 BUG re-allow zero-based indexes in SVMlight files
Fixes issue #750.
2012-04-04 22:44:53 +02:00
Olivier Grisel 0f8b3c2097 FIX: fix test: integers are valid file descriptors in py3k 2011-12-26 17:42:06 +01:00
Olivier Grisel bc18af34bd FIX: py3k need explicit bytes buffers for svmlight format serialization 2011-12-26 10:58:38 +01:00
Lars Buitinck ad53ecd657 Merge branch 'master' into multilabel
Conflicts:
	sklearn/datasets/_svmlight_format.c

Solved by re-cythonizing.
2011-12-21 11:15:33 +01:00
Lars Buitinck ef6a563f25 BUG fix off-by-one error in SVMlight format loader
Apparently, column indices in SVMlight/LibSVM data files are one-indexed.
2011-12-20 17:18:40 +01:00
Mathieu Blondel c3aa2d7e8d Merge multilabel branch with master.
Conflicts:
	sklearn/datasets/_svmlight_format.c
	sklearn/datasets/_svmlight_format.pyx
	sklearn/datasets/tests/test_svmlight_format.py
	sklearn/preprocessing/__init__.py
2011-12-20 12:41:42 +01:00
Andreas Mueller 741dfd37aa some pyflakes 2011-11-28 23:39:55 +01:00
Andreas Mueller 1955ffdba4 COSMIT some pep8 2011-11-28 23:39:46 +01:00
Lars Buitinck 6f232b9309 ENH multilabel support in SVMlight loader 2011-10-27 14:05:54 +02:00
Lars Buitinck 2fb124a8d5 API change in SVMlight reader: handle multiple files with svmlight_load_files
This might not seem as convenient as having svmlight_load_file handle multiple
files itself, but it's much easier to keep consistent and document (!).

Also, removed the buffer_mb parameter, which was unused, and introduced a dtype
parameter to determine the underlying type of the returned sample vectors.
2011-10-02 16:16:46 +02:00
Mathieu Blondel edd47de388 Add dump_svmlight_file. 2011-09-30 16:30:43 +09:00
Fabian Pedregosa ddf4b72109 Move project directory from scikits.learn to sklearn 2011-09-02 12:06:57 +02:00
Fabian Pedregosa 68f27e3790 Revert "Move project directory from scikits.learn to sklearn"
This reverts commit fd0d3b879d.
2011-09-02 12:03:18 +02:00
Fabian Pedregosa fd0d3b879d Move project directory from scikits.learn to sklearn 2011-09-02 11:38:24 +02:00