ML bidding for Trivago

The ML optimizer that never overpays for the top slot

Predict Top Position Share at hotel-and-date level, then set CPA and discount inside commercial bounds — and ship a CSV operations can upload to Trivago.

TPS Optimizer — Recommendations dashboard
1,327Hotels
6,480Recs / 5-day window
102Features
HotelDateCPADiscountMargin
1975523 Dec7.20%−0.60OK
2191523 Dec7.80%−0.90OK
33896124 Dec7.35%−0.78OK
1,327
Active hotels
6,480
Rows uploaded
0
CPA bound hits

One pipeline, every step of the bid

From Athena to a Trivago CSV

The same 102 features at train and serve. Two LightGBMs. Constraints applied before the file leaves the building.

Two-stage TPS forecast

A classifier decides whether a hotel will hold the top slot. A regressor sizes the share. Final TPS is the product, so zeros stay zeros.

Constraint-safe actions

CPA 7–10%, discount −15% to 0%, margin ≥ 10%. Illegal rows are dropped before upload — not left for ops to catch.

ML vs rule-based

Every run writes a comparison file next to the Trivago CSV, so bidding teams can see where the model diverges from city heuristics.

Proven on held-out data — and on a live city slice

Oct–Dec 2025 test split, plus 26 Dec city averages (25 cities, ≥10 hotels), matching the client’s own analysis.

0%
Classifier accuracy
0
TPS R²
0%
Lower MAE vs prior model
~0%
Lower CPA vs rules
−0.14
Milder discount vs rules

How It Works

From first hotel-day to an upload file in three steps.

01

Connect the data

Join Trivago performance, rate insights, and the discount archive on hotel ID and date. Build lags, rolling TPS, and calendar features.

Talk to us →
02

Predict, then price

Classify TPS > 0, regress the value, map the forecast to CPA and discount inside the commercial box, enforce margin.

Talk to us →
03

Upload and compare

Future dates clone the latest hotel row. Output is hotel_id, date, cpa, discount — plus an ML vs rules file and a run report.

Talk to us →

Why bidding teams choose this model

Built for Trivago US POS hotels that need cheaper bids without dumping rate.

Cheaper CPA

City-average CPA 7.35% vs 8.54% on rules — about 14% lower, without a harsher discount.

No invented demand

Zero-TPS hotel-days do not get a made-up discount. Those rows stay NA, matching ops extracts.

Legal files

Zero CPA and discount bound violations on Dec 16–27 production windows. Margin failures dropped pre-upload.

Ops-native output

Percentages, two decimals, the columns Trivago expects — not an internal research table.

Everything the delivery includes

From first ring of Athena to a Lambda that can sit behind the existing optimizer API.

Training

Feature prep, base and constrained LightGBM, notebooks, serialized models, importance reports.

Inference

Future-date pipeline, last-14-day clone, comparison CSV, run HTML report.

Dashboard

React UI and Flask API to pick dates, run the job, and chart CPA, discount, and margin.

AWS SAM

Containerized Lambda package so recommendations can be served as an API, not only a laptop script.

Frequently Asked Questions

Everything a bidding or data team usually asks before the first upload.

01   What constraints does the model respect?

CPA 7–10%, discount −15% to 0%, margin at least 10%. Rows that fail margin are dropped before the Trivago file is written. Production runs in December had zero CPA and discount bound violations.

02   How do you price dates that have not happened yet?

If the window starts today or later, the pipeline pulls the last 14 days of history, clones the latest hotel row onto each requested date, and refreshes calendar features (day of week, month).

03   What does the Trivago upload file look like?

Columns are hotel_id, date, cpa, discount. CPA and discount are percentages with two decimals — the format operations already use, not a decimal from an internal API.

04   How does this compare to the current rules?

On 26 Dec, across 25 cities with at least 10 hotels, ML CPA averaged 7.35% vs 8.54% for rules, with a milder discount (−0.78 vs −0.92). Each run also writes a full hotel-level comparison CSV.

Have questions?

We’re here to help

Product walkthroughs, date-window runs, or a fork of the delivery package.

Email
contact@hytgenx.ai

Location
522 W Riverside Ave, Spokane, WA 99201