Setting n_factors Collaborative filtering?

Hello all,
I would like to ask you about n_factors when I build collaborative filtering model.
Can I choose random number for n_factors? In the lesson, he used 5 or 50 n_factors.
Also, would you explain what n_factors’ role is?

Thank you so much for your time!

n_factors is just the size of the embeddings for each element. In the tutorial images, there are say x rows and each row has 5 features. These features are n_factors. They are what determine the features of a movie.
The more the features, the more accurate your model, but also harder to train. you should experiment with different n_factors and see what results you get.

Thank you so much for your reply!