ycjuan / libffm

A Library for Field-aware Factorization Machines

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Assigning `1` to multiple binary features in the same field

alexklibisz opened this issue · comments

Consider a case where several of the binary features in a field can be true. For example, one might want to encode the history of recent advertisers that were shown to a user.

In regards to this, the paper says:

Note that according to the number of possible values in a
categorical feature, the same number of binary features are
generated and every time only one of them has the value 1.

I'm using this python wrapper, and it trains on such a feature configuration. For example, the following (field, feature, value) sample will run:
[(1, 2, 1), (2, 3, 1), (3, 5, 1), (3, 6, 1), (3, 7, 1)]. But this seems to go against the statement from the paper.

So is this code just working by coincidence, or is it the FFM actually capable of learning from this sort of "history" encoding?

For FMs, I know it was not a problem. But for FFMs, I don't know.

It is cumbersome that most of the FM data formats force a one-to-one relationship.

same question, any answer?

@zeushera140 Unfortunately I don't remember how the results looked for this. I know if was able to train, as stated in the question.

So, can't we use tags as features? Tags would be one field, but, several of them can be true for one instance. Any thoughts on how to use tags with FFM?