more memory-efficient word count calculation#4968
Closed
aupiff wants to merge 3 commits intoscikit-learn:masterfrom
aupiff:only-tfidf-memory-fix
Closed
more memory-efficient word count calculation#4968aupiff wants to merge 3 commits intoscikit-learn:masterfrom aupiff:only-tfidf-memory-fix
aupiff wants to merge 3 commits intoscikit-learn:masterfrom
aupiff:only-tfidf-memory-fix
Conversation
Member
|
travis is unhappy |
Member
|
@aupiff Is this still being worked on? |
Author
|
@jmschrei Yes! I forgot about this for a little while. I'm fixing a few failing tests now. |
Author
|
@jmschrei all tests passing now! sorry this took so long to fix. |
Member
|
Excellent! Would it be possible for you to provide some simple benchmarks, and the code which runs those benchmarks as well? It would make it easier for us to ensure the quality of your code. |
Member
|
👍 for some benchmarks :) |
Contributor
|
I've added this vectorizer to my benchmark script for #5122 and added a line to the results table. |
ephes
added a commit
to ephes/scikit-learn
that referenced
this pull request
Aug 17, 2015
rth
pushed a commit
to rth/scikit-learn
that referenced
this pull request
Aug 27, 2016
rth
pushed a commit
to rth/scikit-learn
that referenced
this pull request
Aug 27, 2016
Member
|
Superseded by #7272 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
(SPLITTING UP PR #4941)
previously, line 760 in
text.pywould cause memory issues as
len(j_indices)is equal to the entire corpus' word count. I had issues with a dataset of 200,000 documents with ~4000 words each when many gigabytes would be allocated temporarily. I've eliminated the need for this line and theX.sum_duplicatescalculation without a perceptible performance hit.