Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BoW: fix vectorisation to use only original weights for IDF on new data #745

Merged
merged 1 commit into from
Nov 19, 2021

Conversation

PrimozGodec
Copy link
Collaborator

Issue

Bag of Words computed TF-IDF on new Corpus (from computing values) considering counts in new Corpus for IDF weighting. I think it should consider counts from the original Corpus for IDF. One document on the input resulted in different output than the same document in Corpus with others.

Description of changes

Use counts from the original Corpus for the IDF part.

Includes
  • Code changes
  • Tests
  • Documentation

@PrimozGodec PrimozGodec changed the title [Needs discussion] BoW: fix vectorisation to use only original weights for IDF on new data BoW: fix vectorisation to use only original weights for IDF on new data Nov 14, 2021
@PrimozGodec
Copy link
Collaborator Author

PrimozGodec commented Nov 14, 2021

Note to myself:
- add a test with a simple corpus where weights can be computed manually

@ajdapretnar ajdapretnar merged commit 55345c7 into biolab:master Nov 19, 2021
@PrimozGodec PrimozGodec deleted the fix-tfidf branch March 29, 2023 10:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants