🎬

Hit Movies Choice Engine

Pick a reference film to find the films someone who loves it would value most.

CE: quadratic consumer surplus with logistic shadow prices · VSM: cosine similarity

Algorithm Information

CE — Consumer Surplus Formula

CS(cand | ref) = Σcontinuous b·q_R·q_C − ½·b·q_C²
             + Σ0/1 flags ½·b·[q_R·q_C + (1 − q_R)(1 − q_C)]
             + ½·b_fr·[same franchise] + ¼·b_fr·[same universe]
             + b_era·e_R·e_C − ½·b_era·e_C²   (e = (year − 1980) / 39)

Every feature is scaled to [0, 1]: running time by its maximum, log budget min-max (a log has no natural zero), and track-record counts as log(1 + n) over the maximum. The rest are 0/1 flags. The X factor (intercept + year effect) is shown as hit potential on every card, but it is not added to the ranking score.

Where the weights come from

Shadow prices. The CE needs one non-negative weight per feature. The weights are logistic-regression slopes for making a year's top 40 at the US box office, with a fixed effect for each year and standard errors clustered by lead star. A slope on a [0, 1] feature is the log-odds value of that feature. Rankings don't depend on the weights' overall scale, so log-odds work as well as dollars.

Negative slopes → reflection. Where a slope is negative (adult audience, period setting, rated G, Jan/Feb/Sep release…), the feature is replaced by its complement q′ = 1 − q ("not adult", "not period"). The refit has the same log-likelihood with the sign flipped, so every β ≥ 0 and self-rank-1 holds without zeroing anything.

0/1 features score agreement both ways. Two films earn ½·b when they share a flag or both lack it. Without this, a flag that lowers the odds (sci-fi, period setting) would be flipped to "not sci-fi" and two sci-fi films would get nothing for sharing it. Scoring agreement both ways makes reflection irrelevant for flags, keeps every β ≥ 0, and a film still matches itself on everything, so it always ranks first.

Franchise

Each film is coded with its film franchise (Star Wars, Indiana Jones, James Bond…) and, where one exists, a shared universe (Marvel Cinematic Universe, Wizarding World, Middle-earth…). 1,187 films share a franchise with at least one other film in the data, across 411 franchises. Like era, the weight can't be estimated from the hit model: the regression says whether being a sequel helps a film, not whether a fan of one Star Wars film values another. So it's a viewer dial. Same franchise adds ln(k) to CS (worth ×k odds); same universe adds half that. Within a franchise, the sequel and remake flags count as agreement: that a film is the original and its partner the sequel is the franchise relationship itself, not a difference in kind. Without this, the first film of every franchise (Home Alone, Toy Story, The Terminator) lost as much on "sequel vs original" as it gained from the franchise bonus. The default is ×2. Across 400 random franchise films, their franchise-mates' median CE rank is 3, and 86% land in the top 10 (×1.5: 76%; ×3: 93%). VSM adds franchise and universe as two one-hot dimensions whenever the dial is on. In a sourced check of 80 films against Wikipedia, 78 franchise codes were correct; the two misses were borderline (a loose 1955 remake, a 2020 spin-off).

Business switch. Off (default): weights from a model of the film's content only: genres, sequel/remake, source, audience, tone, setting, spectacle, lead, ending, romance, running time and rating. On: the full model. Budget, whether the budget was published, major studio, release window, US production and the star's and director's prior hits and non-hits join the CE score, and hit potential includes them. Within-year AUC (in sample): content only 0.810, with business 0.871.

Indifference. CS is in log-odds, so the gap becomes an odds multiplier: e(CS_R − CS_C) is how many times better the candidate's odds of being a hit would need to be to make up for the mismatch with the reference.

Era

Era is one more continuous term, e = (year − 1980) / 39. Its weight can't be estimated, because every comparison in the regressions is within a year, so it is a viewer-preference dial. It's set by the penalty for a 10-year gap: b_era = ln(k) / (½·(10/39)²). Because it's quadratic, 20 years costs k⁴ and 30 years k⁹. The default is "Light", so content still drives the ranking. VSM doesn't use era.

Synopses, loglines and chips

Every film was coded from general knowledge only, without the coder being told how it did at the box office, and "don't know" was allowed. 6,292 films were known well and 395 partly; 20 films the coder didn't know are left out of the engine. In a sourced check, agents that didn't do the coding opened Wikipedia pages for 120 films, 20 per hit/non-hit × era cell. Synopses: 110 correct, 10 right in gist with a detail off, none wrong. Codes: franchise 94%, source 98% and genres 97% agreed with the source.

Chip colours come from the main hit model (all features, year fixed effects, clustered SEs). A chip is green or red only where the Benjamini–Hochberg q is below 0.05. Green means more common in hits, other things equal; red means more common in non-hits. Chips don't enter the ranking.

A caveat on hindsight: the coder may know which films were hits. The factual codes (genre, sequel, source, rating, running time) alone reach a within-year AUC of about 0.78; the judgement codes (tone, spectacle, audience, ending) reach 0.75.

VSM — Vector Space Model

VSM(ref, cand) = (v_ref · v_cand) / (‖v_ref‖ · ‖v_cand‖)

Cosine similarity on the unreflected [0, 1] feature vector: the 46 content features, plus the 11 business features when the switch is on. Unweighted.

Weights

FeatureTypeContent only+ business
Genre: action0/1 match0.062′0.044′
Genre: adventure0/1 match0.008′0.008
Genre: animation0/1 match0.9680.702
Genre: biography0/1 match0.053′0.047′
Genre: comedy0/1 match0.3880.172
Genre: crime0/1 match0.0250.059′
Genre: drama0/1 match0.228′0.037′
Genre: family0/1 match0.5540.572
Genre: fantasy0/1 match0.013′0.063′
Genre: horror0/1 match0.107′0.212
Genre: musical0/1 match0.3110.264
Genre: mystery0/1 match0.4920.392
Genre: romance0/1 match0.0120.046
Genre: sci-fi0/1 match0.106′0.369′
Genre: sports0/1 match0.220′0.166′
Genre: thriller0/1 match0.002′0.163′
Genre: war0/1 match0.195′0.132′
Genre: western0/1 match0.0900.156′
Sequel / spin-off0/1 match0.8970.805
Remake / reboot0/1 match0.4060.210
Source: book0/1 match0.0270.056′
Source: comic0/1 match0.4790.302
Source: TV show0/1 match0.3770.257
Source: true story0/1 match0.0200.071
Source: stage play0/1 match0.083′0.154
Source: toy / game0/1 match0.736′0.711′
Audience: kids & family0/1 match0.087′0.177′
Audience: teen0/1 match0.515′0.124′
Audience: adult0/1 match0.619′0.437′
Tone: light0/1 match0.2500.213
Tone: dark0/1 match0.2150.226
Setting: period0/1 match0.598′0.486′
Setting: future / other world0/1 match0.390′0.300′
Spectacle: high0/1 match1.1030.523
Spectacle: low0/1 match0.458′0.134′
Lead: female0/1 match0.063′0.161
Lead: mixed / co-leads0/1 match0.055′0.027
Lead: non-human0/1 match0.5870.573
Rated G0/1 match0.514′0.270′
Rated PG0/1 match0.225′0.275′
Rated PG-130/1 match0.1630.089′
Unrated0/1 match4.010′2.071′
Ensemble / two-hander0/1 match0.0590.004
Happy ending0/1 match0.7150.514
Romance drives the plot0/1 match0.1210.072
Running timecontinuous10.5776.975
Budget (log)continuous—8.570
Budget not published0/1 match—1.406′
Major studio0/1 match—0.698
Summer release (May–Jul)0/1 match—0.600
Holiday release (Nov–Dec)0/1 match—0.184′
Jan / Feb / Sep release0/1 match—0.101′
US production0/1 match—0.682
Star's prior hitscontinuous—1.049
Star's prior non-hitscontinuous—0.321′
Director's prior hitscontinuous—0.635
Director's prior non-hitscontinuous—0.557′
′ = applied to 1 − q (reflected). The content-only column comes from a separate refit without the business features, so its weights are not conditioned on them.

Invariants

I1 β ≥ 0: content ✓ · + business ✓
I2 q ∈ [0,1]: ✓
I3 self-rank-1: 0 / 0 violations in 500 random references (Python); the first 20 are re-checked in the browser with and without the strongest era weight
I4 X sum-check: ✓
CS(q_R,q_R) − CS(q_R,q_C) = ½·b·(q_R − q_C)² ≥ 0

Data

Films: the IMDb-derived "movie-stats" list, about 200 of the most-voted films per year, filtered to those with a US release. Hits: each calendar year's top 40 US grosses from Box Office Mojo (1981 and 2001 from The Numbers). A film's year is the year of its best chart placing, or its US release year if it never made a top 40. 2020 is excluded. Budgets are published figures, and about a quarter are missing; missing budgets are imputed at the median for the year and genre and flagged.