lightfm icon indicating copy to clipboard operation
lightfm copied to clipboard

Model input: CSR vs COO sparse matrices ? (Different results)

Open jimzer opened this issue 3 years ago • 1 comments

I noticed a strange issue using the library with the sparse matrices format.

If I use the same interaction matrix but as CSR while training, I get different results when evaluating compared to using a COO matrix for interactions. Is it a normal behavior ?

Also how can I be certain of the format I should use for all LighFM input: lightfm.Dataset returns all COO matrices when building interactions and features, but in the source it's said that user_features and item_features should be as CSR.

Thanks for you help !

jimzer avatar Sep 04 '20 14:09 jimzer

I tried both csr and coo matrix on train/test data, and I got nearly the same result(mAP) of model. But I'm curious about which data format is better for training lightFM model, too.

hcygeorge avatar Oct 05 '20 04:10 hcygeorge