Giter Site home page Giter Site logo

Comments (10)

Leavingseason avatar Leavingseason commented on June 5, 2024

hi sddi,
deepFM reads sparse data as input, but notice that each instance must have exactly the same number of features, which is the "field number" in the paper. So if a field is empty or missing, you should append a zero fake value for it.

from openlearning4deeprecsys.

sddi avatar sddi commented on June 5, 2024

hi @Leavingseason , thank you for answering. I have millions of features, if i append a zero fake value , the input file maybe very large, could you update the code support the input format likes libsvm format(index:value, if value is zero, omit it in the input file )?

from openlearning4deeprecsys.

Leavingseason avatar Leavingseason commented on June 5, 2024

hi sddi,
How many fields of feature (not the number of feature) do you have? Actually we do not request for every feature append a zero value, instead for each field, if there is no feature under it, we will append a zero fake value. The deepFM model use field-wise dense embedding as the input for deep neural network, so the number of fields can not be too large.

from openlearning4deeprecsys.

sddi avatar sddi commented on June 5, 2024

oh~~ @Leavingseason i see~~~
for instance, i have two fieds of feature, userID features(index from 0 to 100), itemID features(index from 101 to 1000). for one sample, in the input file maybe, "1 36:1 108:1 123:1 365:1", is it ok?

from openlearning4deeprecsys.

Leavingseason avatar Leavingseason commented on June 5, 2024

That's partially right. Now my code only supports at most one feature for each field, which follows the original paper's framework. So for itemID features, you can only keep one itemID. I know you concerns, in the real world, multiple features under one field happens a lot. We have the corresponding version of code to handle this case, which leverages sparse embedding lookup https://www.tensorflow.org/api_docs/python/tf/nn/embedding_lookup_sparse, and the input format becomes fieldID:featureID:value. We will consider to release this version.

from openlearning4deeprecsys.

sddi avatar sddi commented on June 5, 2024

OK,thank you very much! I am waiting for your new version~~~:D

from openlearning4deeprecsys.

waitingc avatar waitingc commented on June 5, 2024

Have the version which supports "multiple features under one field" released ? Thanks

from openlearning4deeprecsys.

Leavingseason avatar Leavingseason commented on June 5, 2024

Not yet. All right, since some people are interested in this version, I will release a preview code which is now very ugly. I will try to find some time in two days (it is so sad that KDD deadline is near...)

from openlearning4deeprecsys.

Leavingseason avatar Leavingseason commented on June 5, 2024

Done.

from openlearning4deeprecsys.

CheungZeeCn avatar CheungZeeCn commented on June 5, 2024

@Leavingseason hello, 请教一个格式上的问题,fieldID:featureID:value 这里,如果fieldID==1 对应的featureID 有3个,如果fieldID==2对应的featureID 有2个,fieldID==2的 featureID 的值的编码需要基于 fieldID==1 的featureID 上吗? for example:

0 1:1:1 1:2:1 1:3:1 2:1:1 #这里fieldID==2的 featureID 可以重新编码
0 1:1:1 1:2:1 1:3:1 2:4:1 #这里fieldID==2的 featureID 不可以重新编码,需要基于原来的1之上,谢谢!

from openlearning4deeprecsys.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.