Other Projects

Other interesting projects

Scroll to explore
AI · Machine Learning

Movie Revenue Prediction

A regression study that treats revenue as something learnable from the data a film carries before it opens — budget, cast votes, genre, language, release timing and its synopsis. A multi-layer perceptron is trained on engineered features, extended with text embeddings of the overview, and measured against a linear baseline on both a standard and an outlier-heavy test set.

Role
Solo — data, feature engineering, modelling & evaluation
Focus
Regression · feature engineering · model comparison
Stack
Python · scikit-learn · pandas / numpy · matplotlib / seaborn
Overview

Turn messy movie metadata into a regression target

The data is pulled together from TMDB and IMDB sources and is noisy out of the box, so the first job is aggressive cleaning: dropping high-null or irrelevant columns (poster paths, taglines, homepages) and removing rows with missing values while keeping as many samples as possible.

What survives is reframed as a supervised regression problem — predict revenue from a mix of numeric, categorical, temporal and text features — split 80/20 into train and test, with a separate benchmark set carrying extreme revenue values to probe how the models behave on outliers.

Core — Feature engineering

Encoding everything a film tells you up front

01

Categorical multi-hot

Genres, spoken languages and original language are multi-hot encoded and normalised into a [-1, 1] range, so a film can carry several genres at once without imposing a false ordering.

02

Cyclic dates

The release date is decomposed into year, month, day and day-of-week, with the cyclical parts sine/cosine encoded so December sits next to January rather than at the opposite end of a line.

03

Text embeddings

The title and overview are turned into pre-trained word embeddings, letting the synopsis contribute signal — an "extended" feature set tested directly against the version without it.

04

Scaled numerics

Budget, vote count and popularity are standardised and scaled; of all the inputs, budget and vote count showed the strongest individual correlation with revenue (r ≈ 0.74 and 0.75).

Models & results

A neural net, its embedding variant, and a linear baseline

Movie metadata is engineered into one feature vector, then a three-layer MLP and a linear baseline predict revenue from the same inputs — the comparison is the point.
Categoricalsmulti-hotgenres · languages → [-1, 1]
Release datecyclicmonth/day sin · cos
Title + overviewword embpre-trained embeddings
Numericsscaledbudget · votes · popularity
Engineered feature vector
concatenated · standardised
MLP regressor
Dense 100
ReLU
Dense 100
ReLU
Dense 100
ReLU
Adam · early stopping · R² ≈ 0.84 (+ overview emb)
Linear baseline
LinearRegression
one weight per feature
R² ≈ 0.66 · most robust on outlier-heavy data
Predicted revenue
80 / 20 split + outlier benchmark set

Extended MLP

A three-layer MLP regressor (100 units each, ReLU, Adam, early stopping) with the overview embeddings reached the best fit on the standard set — R² ≈ 0.84 — at the cost of clear overfitting.

Base MLP

The same network without embeddings landed at R² ≈ 0.75 — strong, and with a much smaller feature space, so its adjusted R² held up better than the extended model's.

Linear baseline

Plain linear regression came in at R² ≈ 0.66 on the standard set but proved the most robust of the three on the outlier-heavy benchmark, generalising where the networks did not.

The honest read

Embeddings bought accuracy but also dimensional bloat and overfitting; the takeaway is the trade-off itself — more signal is not free, and the simplest model wins when the test data gets extreme.

Tuning

Searching the architecture and learning rate

Beyond the headline comparison, the study sweeps the network shape — neuron counts from ten up to a couple hundred and hidden-layer depth across a wide range — and the learning rate, finding that an initial rate of 1e-05 trained better than 1e-06, and that adding capacity mostly just demanded more iterations to converge while validation R² plateaued near 0.7.

Stack

What it's built on

Modelling
scikit-learnMLPRegressorLinearRegressionEarly stopping
Features
Multi-hot encodingCyclic date encodingWord embeddingsStandardScaler / MinMaxScaler
Data
TMDBIMDBpandasnumpy
Evaluation
R² / adjusted R²RMSE / MAEmatplotlibseaborn

A solo regression study from raw data to result — cleaning multi-source movie metadata, engineering categorical, cyclic, text-embedding and numeric features, and comparing an MLP (R² ≈ 0.84) against a more robust linear baseline on standard and outlier-heavy data.