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

nan predictions #21

Open
eloiup opened this issue Oct 25, 2017 · 2 comments
Open

nan predictions #21

eloiup opened this issue Oct 25, 2017 · 2 comments

Comments

@eloiup
Copy link

eloiup commented Oct 25, 2017

using the python wrapper (libffm-python)

for some reason, when the input dataset becomes too large (too many "fields" ~ about 29 or more), the predictions (at least the first iterations, havent checked if it changes eventually after N iterations) are all NaN

*edit: few samples of data, even a one row dataframe, presents the same issue, so it appears to be "fields" related

*edit2: tested, doesnt cnverge after N iterations

@HuidaQ
Copy link

HuidaQ commented Oct 25, 2017

Having the same issue. I'm only using 1 field (e.g. same as a regular FM), training data has around 700k rows.

@thenx
Copy link

thenx commented Oct 30, 2017

Not sure that it's your case but still...
This could be a result of a division https://github.com/guestwalk/libffm/blob/26c13b22ae7eb829b8ed6ac191d890c25dbc5733/ffm.cpp#L598
Which sometimes might be an inf/inf due to exponentiation earlier:
https://github.com/guestwalk/libffm/blob/26c13b22ae7eb829b8ed6ac191d890c25dbc5733/ffm.cpp#L592
Then nan propagates to the rest of the coefficients through interactions.

If that's the case then it can be easily fixed by clipping t to some range (as it's done in VW, for instance).

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

3 participants