Commit Graph

32 Commits

Author SHA1 Message Date
Andreas Mueller 0650d5502e DOC adding backlinks to docstrings 2015-06-03 00:24:04 -04:00
Vinayak Mehta ef9cbcb214 added docstrings for restrict
updated docstring

fixed build error

fixed build issue occuring due to different python versions

added doctest: +ELLIPSIS

fixed output

Reformulated docstring
2015-03-17 22:23:13 +05:30
Andreas Mueller 9bc4de8dae some fixes for sphinx and in examples 2015-03-02 12:50:53 -05:00
Lars Buitinck fd4ba4d9cb MAINT: set attributes as last action in DictVectorizer.fit
Prevents getting a half-initialized transformer when an exception occurs.
2014-09-23 12:33:51 +02:00
Lars Buitinck a7a05120e2 MAINT: handle frombuffer with empty 1st arg in utils.fixes 2014-09-22 17:23:51 +02:00
Lars Buitinck 7354359bca MAINT refactor DictVectorizer's transform+fit_transform (1)
Also:

* postpone attribute setting to the end of the fit_transform algorithm,
  so that exceptions leave the transformer in a consistent state;
* call sort_indices on CSR result.

Didn't refactor fit as I couldn't get the code shorter without making
_transform cumbersome to read.
2014-09-22 16:44:47 +02:00
Dan Blanchard 324e3c9419 ENH sort option for memory-efficient DictVectorizer
Added memory efficient UnsortedDictVectorizer

When loading really large files for SKLL, I found that temporarily
storing a list of dictionaries to pass to DictVectorizer was frequently
using up huge amounts of memory. You can now call `fit_transform` on an
iterable, and not have to waste the temporary space.

Sorting is done in-place, so it doesn't waste memory.
2014-09-22 16:44:31 +02:00
Joel Nothman b3bdb08964 DOC fix formatting of attributes etc. in docstrings 2014-07-28 19:04:59 +10:00
Andreas Mueller c235c3b566 ENH add allowed_sparse named argument for @ogrisel 2014-07-20 15:31:28 +02:00
Andreas Mueller 6e2a83b4e1 remove check_arrays stuff and old input validation 2014-07-20 13:31:45 +02:00
Andreas Mueller d12d3132c4 Fix some fun column span alignment errors. 2014-06-07 16:48:48 +02:00
Lars Buitinck bd0cf75afa FIX DictVectorizer handling of empty inputs
Fixes #2883.
2014-02-23 18:03:50 +01:00
Lars Buitinck 41d0fb884a DOC make DictVectorizer docstring refer to FeatureHasher
... instead of to itself.
2013-08-19 10:06:35 +02:00
Lars Buitinck 9c2ec560da FIX memory usage in DictVectorizer.fit
No need to materialize X in memory if it's a generator.
Fixes #2171.

fit_transform still needs fixing; it should be single pass.
2013-07-22 10:04:09 +02:00
Lars Buitinck 6713132da5 DOC let OneHotEncoder, DictVectorizer and FeatureHasher refer to each other
Judging by ML and SO questions, users have a hard time finding the right
vectorizers and don't know how to trade off the benefits of these three
classes.
2013-07-18 22:35:05 +02:00
Lars Buitinck e163f8bfef FIX DictVectorizer behavior on empty X and empty samples
More useful error message for former; return all zeros for latter.

Also changed integer type to np.intc, which matches scipy.sparse
index types more closely.

Fixes #1903.
2013-05-04 17:09:07 +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
Mathieu Blondel f21f64a60a DOC: document attributes fitted by DictVectorizer. 2013-04-11 23:23:48 +09:00
Andreas Mueller a1d4d184fe COSMIT pep8 2013-04-02 13:30:55 +02:00
Lars Buitinck 8ee4513f9c COSMIT DictVectorizer.inverse_transform readability 2013-03-12 14:37:16 +01:00
Lars Buitinck 09f2d90262 P3K make feature_extraction.text work
All tests pass with Py2 and Py3.
2013-03-10 22:20:29 +01:00
Andreas Mueller 7d4034a21c COSMIT removed unused imports, fixed error message in test of boosting 2013-02-04 20:53:20 +01:00
Lars Buitinck 57b86fc434 P3K use six.string_types and six.PY3 2013-02-03 20:12:42 +01:00
Olivier Grisel cde9fbf9c4 P3K: support for py3k in dict_vectorizer module 2013-02-03 20:04:19 +01:00
Lars Buitinck 749ea70370 ENH let DictVectorizer build a CSR matrix directly and use array.array
Prevents copying.
2012-09-29 23:01:27 +02:00
Lars Buitinck ef62a60be7 DOC + FIX DictVectorizer: actually support single Mapping arg in transform 2012-04-09 16:31:54 +02:00
Lars Buitinck 28e012cebb COSMIT use sorted instead of list.sort in DictVectorizer
Guaranteed to return a list, even in Python 3.
2012-04-02 17:52:09 +02:00
Olivier Grisel e4ce5cf20d ENH: sort features in dict vectorizer + new doc 2012-04-01 03:13:23 +02:00
Lars Buitinck e05e1a42b9 ENH reduce memory usage of DictVectorizer.transform in sparse case
Don't materialize iterable's entire contents.
2012-03-17 12:18:22 +01:00
Lars Buitinck d5126a7fad DOC + pyflakes in DictVectorizer 2012-03-17 12:11:41 +01:00
Lars Buitinck 49e29534d5 ENH optimize DictVectorizer (sparse case)
Constructing a 7944 × 9491 coo_matrix (55608 non-empty elements)
is about 3x faster than with the old lil_matrix-based code.
2012-03-17 00:48:28 +01:00
Lars Buitinck c128b147b4 COSMIT rename DictVectorizer source files
At the request of @mblondel.
2012-03-16 23:12:41 +01:00