Hi. Yes, all the data is preprocessed using the StandardScaler method from sklearn, which standardize all features by removing the mean and scaling to unit variance. You can check the documentation here if you want more details.
The user_id is also incorporate as predicted feature, what this is doing is to evaluate how old a user is regarding the mean. For instance, let’s say we have 5 users, the mean would be:
1 + 2 + 3 + 4 + 5 = 15
15/5 = 3
mean = 3
sd = 1.4
So the scale in this case does the function to say on average how old a user is by doing:
(1 - 3)/1.4 = -1.4
The value for the first user would be -1.4, in the print the numbers are rounded, but they contain the actual values.
Here the first and the second columns are set to print as integers. You can see the original, decimal numbers with print(user_train).
Then after you also run the train-test-splitting code, the samples are shuffled and sampled, and at this time if you, again, go back to print the data, you get what you have posted:
I would think that the ids have nothing to do with the training, but only the features of whatever is associated with the ids. You’re not going to be predicting a movie id or a user id.
Exactly, unless, for example, the movie id is in the order of time so it may possess some release time information that I cannot get from other features. However, it is unlikely I would include any of them.