0
$\begingroup$

Okay so my goal is to create a program to predict average rating of a movie, based on release date, director and actors playing in it. Some movies have one/two directors, some movies have one/two/three actors. I created a dataset like this:

Avengers: Infinite War  8.5 2018    Joe Russo   Mark Ruffalo
Avengers: Infinite War  8.5 2018    Joe Russo   Robert Downey Jr
Avengers: Infinite War  8.5 2018    Anthony Russo   Mark Ruffalo
Avengers: Infinite War  8.5 2018    Anthony Russo   Robert Downey Jr

As you can see, its a combination of directors and actors for every title. First question: Is that a good dataset? It's my best idea for handling multiple actors/directors for one title. Can it be done better?
To make this more numeric, I deleted title and replaced actors/directors names with their id's. Thats how it looks now:

averagerating   startyear   director    star
6.2 2013    615592  182666
6.3 2003    609236  518085
7.4 2007    318 136
6   2014    1024    182666
6.6 2004    462895  136

Second question: what now? Can you guys give me some advice on what approach/algorithm should I use to achieve my goal?

$\endgroup$

1 Answer 1

0
$\begingroup$

I will tell you what I would do with each feature if I was working on the same problem:

  • Director: I would iterate over the whole dataset and encode each director as a one hot vector. The vector's size would be number_of_unique_movie_directors.
  • Actors: Same as the directors, iterate over all actors for a movie, and encode each actor as a one hot vector. In the end, for each movie, you will have a vector of size number_of_unique_actors where all elements will be zeros except for the elements where the actors that play in that movie are encoded.
  • Date: You always want to convert the date to a feature. Just passing the year of release by itself is not sufficient. For example, what you could do is convert the date to a vector that will denote the season that the movie was released. That way you could encode seasonal features. In case you want more than that, you can convert the year of the date to the number of years passed since the first movie was released (rough example).

In the end, you should concatenate all this vectors into one feature vector that in my case it will size of: number_of_unique_movie_directors + number_of_unique_actors + number_of_seasons + 1 (the element for the year)

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.