Help with creating dimensions/features It is quite hard to name the title properly as I just started to learn ML, will try to explain here. I want to practice ML by creating Movie suggestion algorithm. I came up with the following list of dimensions/features:


Rating
Number of votes
Genre
Actors
Directors
Writers
Year
Combination of Actors/Directors/Writers working in the team
Combination of Year and Actor or Director or Writer
Actor or Director or Writer working in some genre


There is no problem for me for numeric fields, but in case of actors I have multiple values. How to create feature for the actors?
You could create a "flag" variable for particular actors. Each actor would have their own column in your data and the column would have a 1 if the actor was in that film and a 0 if the actor was not in that film.

Of course, this creates lots of columns and can be tedious to code, but binary indicator variables can be really useful if you want to build a predictive model - worth it in my opinion.

Example:

       actor1  actor2 actor3
movie1   1       0      0
movie2   0       1      1
movie3   0       1      0


Edit Re: Director/Actor

It is probably unrealistic to create a variable for every permutation of director/actor combinations. If you want to see how the variables interact you can code interactions into your model when you build it. If you were to do that in R it would look like this:

movie.predictor &lt;- lm(suggestion ~ actor1 + actor2 + director1 + director2 +
                      actor1:director1 + actor2:director1 + actor1:director2 +
                      actor2:director2,
                      data = movies.data)


The ":" in R asks the lm(...) function to consider the interaction of those two variables in the regression problem, assuming you are doing regression. Don't worry the same ":" technique works across several model functions. Just read the documentation for your preferred language and package and look for how to code "variable interactions"

Of course, now you are typing out all of the permutations of variable interactions. You might want to also consider a clustering algorithm to group actors and directors together. I am not a movie expert but it seems like directors have favorite actors (and vice-a-versa) so I would expect there to be clusters of directors and actors with a little overlap here and there.