# Performance Predictions of Sci-Fi Films via Machine Learning
## 2 Methodology
### Dataset Preparation  
Figure 6 depicts the implementation structure of the proposed algorithm. The first step is data collection because predictions are based on historical information. Two popular and complementary sources, IMDb and Box Office, were selected to assess the algorithm's efficacy. IMDb provides more detailed story summaries, while Box Office provides complete information on movie earnings and budgets. In other words, the two data sources can be combined to obtain data about several films. Regarding data collection techniques, the two sources are distinct. IMDb offers movie data via an application programming interface (API). The public can only access Box Office's data through its website. The second step involves cleaning, transforming, consolidating, and storing data from both sources in a database. During this project, acquired data is formatted consistently, and duplicates are eliminated from the database. In film titles, only alphabetic and numeric characters are used. This standardization ensures that extraneous characters do not impede the matching of titles between the two data sources. The feature selection procedure ensures that representative weighting factors are introduced using only historical data, as shown in Table 5. The third step entails the creation of features that will ultimately be used to train a predictive model with the collected data. The feature set is partitioned into a training and testing feature set, in which 80 percent of the data is trained with the appropriate machine learning algorithm. When the feature vector has been determined, it is fed into the machine learning algorithm. A predictive model is trained using a complete and robust set of features. Employing machine learning techniques, the optimal prediction model and its parameters are identified based on accuracy, precision, and recall. The results are finally compiled and compared.  
\begin{table}
\begin{tabular}{c c c c c c} \hline  & **IMDB\_Rating** & **Runtime\_mins** & **Year** & **Num\_Votes** & **Box\_Office** \\ \hline
**IMDB\_Rating** & 1.00000 & 0.392518 & \(-\)0.201970 & 0.555694 & 0.283635 \\
**Runtime\_mins** & 0.392518 & 1.00000 & 0.066925 & 0.430708 & 0.451454 \\
**Year** & \(-\)0.201970 & 0.066925 & 1.000000 & 0.030860 & 0.113318 \\
**Num\_Votes** & 0.555694 & 0.430708 & 0.030860 & 1.000000 & 0.639275 \\
**IMDB\_Rating** & 0.283635 & 0.451454 & 0.113318 & 0.639275 & 1.000000 \\ \hline \end{tabular}
\end{table}
Table 4: Correlation matrix.  
Figure 6: Implementation Model.  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Feature** & **Numerical Formula** \\ \hline Actor & 10 \(\times\) Average actor’ Movie ratings over five years/ \\  & max rating of the actors during the five years \\ \hline Director & 10 \(\times\) Average director’s movie ratings/maximum \\  & rating of the directors \\ \hline Month & Average ratings of the movies in that month \\ \hline Year & 10–0.2 \(\times\) number of years \\ \hline Run time & Probability of run time \(\times\) 10; \\ \hline Production studio & 10 \(\times\) (Sum of ratings of the studio/Total sum of \\  & ratings of the top six studios) \\ \hline \multirow{2}{*}{Critic review of the movie story} & Sum of positive critics in the first 1000 story \\  & reviews/(sum of all positive and negative critics in \\  & the 1000 story reviews) \\ \hline Genres & 10 \(\times\) sum of ratings for Sci Fic genre/total ratings for \\  & all genre; \\ \hline Movie stars & Average rating of the top 5 actors in the movie \\ \hline \multirow{2}{*}{Top actor’s social media followers} & 10 \(\times\) (Number of followers of the top five actors in \\  & the movie/top maximum number of flowers for \\  & five actors) \\ \hline Expected budget & Regression equation between IMDB ratings \\  & and budget \\ \hline \hline \end{tabular}
\end{table}
Table 5: Feature numerical representation.