Closed MDTsai closed 2 years ago
I think the tutorial is correct, since later on in the tutorial we compute the transpose of the artist_user_plays before passing to model.fit:
# get the transpose since the most of the functions in implicit expect (user, item) sparse matrices instead of (item, user)
user_plays = artist_user_plays.T.tocsr()
I think this could be clearer though -
Thanks for the information, close this issue.
I try to use implicit in a buyer, supplier, shipment dataset. Follow the lastfm example, I prepare a sparse csr matrix which supplier for row and buyer for column and shipment for value as
artist_user_plays = get_lastfm()
supplier_buyer_shipment.shape
shows(846871, 1148973)
matches the number of unique suppliers and buyers.I don't change the model training arguments so it looks like lastfm example:
When I want to find a similar buyer, I use:
and I got this error:
It looks strange, 846871 should be the number of supplier not buyer(or user), so it throws Error. So I change to:
This works with similar buyers' id.
I don't understand why but I will keep to see if this is my problem or implicit's.