8000 Curious for IDF calculations · Issue #4544 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

Curious for IDF calculations #4544

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

Closed
l1th1um opened this issue Apr 8, 2015 · 2 comments
Closed

Curious for IDF calculations #4544

l1th1um opened this issue Apr 8, 2015 · 2 comments

Comments

@l1th1um
Copy link
l1th1um commented Apr 8, 2015

Hi,

I'm curious for IDF calculations (sklearn/feature_extraction/text.py) line 978

In 0.9, the formula for calculating IDF is log(n_samples/ (df + 1)), then in 16.0 the formula become log((n_samples + 1) / (df + 1)) + 1.

According to the Cornell SMART system, the formula of IDF is log((n_samples + 1) / (df + 1)). So, may I know the reason or reference paper for adding another +1 at the end of formula?

*smooth_idf = True

@jnothman
Copy link
Member
jnothman commented Apr 8, 2015

See #4391, #2998

@l1th1um
Copy link
Author
l1th1um commented Apr 8, 2015

thx

@l1th1um l1th1um closed this as completed Apr 8, 2015
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

No branches or pull requests

2 participants
0