Closed Techie5879 closed 2 years ago
That's because ids are already integers in the dataframe:
print(df.dtypes)
userId int64
movieId int64
rating float64
dtype: object
Surprise will use the same types as pandas here
Surprise will use the same types as pandas here
Thanks, it would be helpful if thats in the documentation though. I think the documentation said that raw ids are strings if Dataset is loaded from an external file like csv.
I'm using the MovieLens small-latest dataset (https://grouplens.org/datasets/movielens/latest/), and reading the "ratings.csv" file into a pandas dataframe, then converting it into a Dataset, then making a trainset, and fitting the algorithm on it.
Now, running
data._raw2inner_id_users
, I should get a dict with keys as the raw ids of users and values as the inner ids of users. But using that givesAs can be seen, the keys are not strings. However, from the docs,
But the raw ids aren't strings here? Why so?