aksnzhy / xlearn

High performance, easy-to-use, and scalable machine learning (ML) package, including linear model (LR), factorization machines (FM), and field-aware factorization machines (FFM) for Python and CLI interface.
https://xlearn-doc.readthedocs.io/en/latest/index.html
Apache License 2.0
3.08k stars 518 forks source link

FFM模型w和v数组寻址问题 || FFM model calc score confusion #275

Open Gavinthisisit opened 5 years ago

Gavinthisisit commented 5 years ago

您好,最近在看FFM模型实现部分有一点困惑,从预测代码实现中看,feature_id 应该是连续累加的,也就是说不同 field 之间的feature index 应该是连续增加的,像FM一样。 Hi,I have a problem about FFM calc score。what I got from the code is that 'feature_id' should be continuous, like what we did in FM. image image

但是在给出的 demo 数据却发现feature index 并不是累加的。发现 featureid 之间的数据存在大小颠倒和相等的列。如下: But the test data is not what I expected.So am I missing something or the test data was just randomly generated? thanks for all. image 请问是我对代码理解有问题?还是 demo 数据是随机生成?

liuyichaosoftware commented 4 years ago

您好,我想请教下您FM模型的calcscore部分的真实公式,在代码里面没能看明白。。。。谢谢您

Anncastle commented 3 years ago

遇到了相同的问题,ffm跑出来的embedding是按特征计算的,请问这个问题后来解决了吗