Open erlebach opened 2 years ago
Please ignore the question. I forgot to remove duplicate member entries in the user_feature matrix.
Hi, I have faced the same issue. Can you please provide the details of how you solved it. It would be great if you can share how you have formatted the data for user_features.
Hi @srinivascnu166, All I did was make sure of two things: (to be checked independently for item and user features) 1) there should be no duplicate rows, i.e., no duplicate items in the item feature list 2) the list of unique items derived from the user/item list should be the same as the list of unique items derived from the item attribute list.
Does this make sense?
When running
fit()
with user features, I get the error:which has been reported previously. In my case, I did some debugging in the source code, and found the following. In the function
_init_interactions
, one finds the statement:which is the error in question. Looking at the definition of
self.user_idx
, one finds, in the same filerankfm.py
:near line 128. Clearly,
self.user_idx
are consecutive indexes 0,1,2, ... up to the number of user ids. However,sorted(x_uf.index.values)
is the sorted list of user ids. Thus, the two lists cannot be equal. The code that leads me to this conclusions is:As far as I understand, the first column of
user_features
, which is an argument to the function, should be the actualuser_id
, which can be anything, as long as it does not appear twice in the dataframe. In this case, the conditional (last line) can not be satisfied. Therefore, I must not understand the data format ofuser_features
. Where is this explained? The documentation states the following:with no additional information regarding the values of
user_id
. Any clarification would be most welcome!