AI Capstone Project Viva Preparation Notes
Project: Predicting Movie Success Using Budget and Revenue
Project Overview
This project attempts to predict the worldwide revenue of a movie using its production budget. The
core idea is based on supervised machine learning, where a model learns a mathematical
relationship between input and output from historical data. We collected real movie data from
2010–2023 and used Linear Regression to learn how budget influences box office earnings. The
project demonstrates how Artificial Intelligence can support decision-making in real industries such
as entertainment and finance.
Complete Workflow (Step-by-Step Explanation)
The project started with data collection. A dataset containing more than 500 movies was obtained.
The two important attributes were production budget and worldwide gross revenue. After collection,
the dataset could not be used directly because real-world data contains errors and missing values.
Therefore data preprocessing was performed. We removed incomplete records, standardized the
currency format, and verified unrealistic entries. This ensured that the machine learning model
receives clean and reliable data.
Next, exploratory data analysis was performed. A scatter plot was created between budget and
revenue. The graph showed an upward trend which suggested a positive correlation. This step is
important because machine learning should only be applied when a pattern actually exists in the
data. After confirming the pattern, the dataset was divided into training data (80%) and testing data
(20%). The training data was used to teach the model and the testing data was used to check how
well the model predicts new unseen values.
The Linear Regression algorithm was then applied. The model calculated the best possible straight
line that fits the data points by minimizing prediction error. Once trained, the model was used to
predict revenues for new movie budgets. Finally, the performance of the model was evaluated
using the R² score. An R² value of about 0.56 means that 56% of the variation in movie revenue can
be explained by the budget alone. This confirms that budget is important but not the only factor
affecting movie success.
Libraries Used and Their Purpose
Python was used as the programming language because it provides simple syntax and powerful
data science libraries. Pandas library was used to read the dataset, organize it into tables called
DataFrames, and perform cleaning operations such as removing missing values. Matplotlib was
used to create graphs such as scatter plots so we could visually observe relationships between
variables.
The scikit-learn library was used to implement machine learning. It provided ready-made functions
for Linear Regression, data splitting, model training, prediction and evaluation. Without this library
we would have to manually write mathematical optimization algorithms. Jupyter Notebook was used
as the development environment because it allows code execution, graphs, and explanations to be
written together in one place, which makes experimentation easier.
Important Functions Used in the Code
read_csv(): This function loads the dataset file into the program and converts it into a structured
table format. dropna(): This function removes rows containing missing values so the model does
not learn incorrect patterns. train_test_split(): This function divides data into training and testing
sets to avoid overfitting.
LinearRegression().fit(): This function trains the model and calculates the best fitting line. predict():
This function estimates revenue for new budgets. score(): This function calculates the R² accuracy.
StandardScaler(): This function scales numeric values so that large numbers do not dominate
model learning.
Top 25 Viva Questions with Answers
1. Why did you choose Linear Regression?
Because we had one input variable and one output variable with an approximately straight-line
relationship.
2. Why not classification algorithm?
The output was a continuous value (revenue), not categories like hit or flop.
3. What is supervised learning?
A type of learning where the model learns from labeled input-output examples.
4. Why was data cleaning necessary?
Dirty data produces incorrect learning and reduces model accuracy.
5. What is overfitting?
When the model memorizes training data but fails to predict new data.
6. Why did you split data?
To test the model on unseen data and measure real performance.
7. What does R² score mean?
It shows how much variation in output is explained by the model.
8. Why use Pandas?
It provides simple tools for handling tabular datasets efficiently.
9. Why use Matplotlib?
To visualize relationships and confirm patterns before modeling.
10. Why use scikit-learn?
It provides ready machine learning algorithms and evaluation tools.
11. What is correlation?
A measure of how strongly two variables move together.
12. Why remove missing values?
They cause mathematical errors and wrong predictions.
13. What is a regression line?
The best fitting line that predicts output from input.
14. Why Jupyter Notebook?
It allows code, explanation, and output in one document.
15. What is training data?
Data used to teach the machine learning model.
16. What is testing data?
Data used to evaluate the trained model.
17. What is prediction?
Estimating output for new unseen input values.
18. Why budget alone not enough?
Other factors like actors, marketing and story affect revenue.
19. What is dataset?
A collection of related data used for analysis.
20. What is model?
A mathematical representation of a real-world relationship.
21. Why use Python for AI?
Because of simple syntax and strong AI libraries.
22. What is feature?
An input variable used for prediction.
23. What is target variable?
The output variable we want to predict.
24. What is prediction error?
The difference between actual and predicted values.
25. How can model be improved?
By adding more variables like genre, actors and release timing.