Closed xiaoxuqi-ms closed 6 years ago
I have found the same question.
guys, sorry for late reply. it seems vague to me now, but I think you are right. The reason behind is the feature index is [0, n-1], and I made a guard on j2 that's why the problem didnt expose. Can you guys submit a PR to fix this issue? If not, I will fix it sometime later. :) Thanks
And I think this should also be fixed in intel mllib.
thanks. please make sure that you've built and tested the PR. :)
Yes, PR is tested
Thank you for reply and fixing this issue.
One more question: in a9a_ffm , all index start from 1, need it minus one when load the data in TestFFM.scala?
I donot think it's necessary though.
As per the weights array, feature index should coincide with each. Let's say a feature j1 = data(i)._2 - 1 gets its weight for field f2 as following: j1 align1 + f2 align0 For FFMModel in FieldAwaredFactorizationMachine.scala, line 122 and line 131, index for datai is data(i)_2 -1, however, for dataii is data(ii). Should these conform with each other? val j1 = data(i)._2 - 1 [line 122] val f1 = data(i)._1 val v1 = data(i)._3 ...... while (ii < valueSize) { val j2 = data(ii)._2 [line 131] val f2 = data(ii)._1 ......