VinceShieh / spark-ffm

FFM (Field-Awared Factorization Machine) on Spark
Apache License 2.0
105 stars 44 forks source link

Feature indices do not conincide #9 #11

Open xiaoxuqi-ms opened 6 years ago

xiaoxuqi-ms commented 6 years ago

PR for Feature indices do not conincide #9

VinceShieh commented 6 years ago

thanks for the PR. But I don't think it's a right fix, I cannot remember exactly why I made a minus 1 to the index, I think it relates to the array index that ranges from [0, N]. I might spend some time to investigate when I have time, meanwhile, you can also help look into this problem. Thanks.

Likelihoood commented 6 years ago

I think the PR of this fix is right. But it need make all index of train data(field index, feature index) start from 0 t0 n-1. Due to index of the sample train data (a9a_ffm) start from 1, it need minus 1 when load the a9a_ffm.