Personalization
The decision tree
The models predict the market. A small decision tree turns that prediction into an answer for you, given your car, your commute, and how much gas you have left.
Why a tree?
A decision tree is one of the most interpretable classifiers in machine learning. Every answer can be traced back through a small number of yes/no questions, so when the site tells you to fill up, you can see exactly why. The market ensemble already produces a probability. The tree's job is the last mile, deciding what that probability means for someone with a quarter tank and a 30-mile commute.
Features it splits on
- days_of_gasEstimated from your tank level, your car's combined MPG (EPA data), and your daily commute. The tree splits at 1, 3, and 7 days.
- tank_levelCurrent tank percentage. A near-full tank (≥ 85%) short-circuits the tree to "wait" regardless of market. If there's nothing to fill, there's nothing to save.
- market_buyThe ensemble's recommendation: YES or NO.
- market_confidenceHow confident the ensemble is in that recommendation. Strong signals (> 0.6) are taken at face value; weak ones get second-guessed.
- vibesExistential dread, 1–5. Mostly a tiebreaker: high vibes flip a borderline "wait" into a "fill up for peace of mind."
The tree
Ten leaves, max depth six. Hand-authored (not trained) because we have no ground-truth data on what users actually did after seeing a recommendation. Think of it as a rule set written in tree form, chosen for transparency over accuracy.
Limitations
- Tank size is hardcoded at 14 gallons. Trucks and SUVs carry more; subcompacts carry less. A future version should pull tank capacity from the EPA dataset alongside MPG.
- Commute is assumed to be the only gas use. Road trips, errands, and weather all change actual consumption.
- The thresholds (1, 3, 7 days; 0.6 confidence; vibes ≥ 4) are author-picked, not learned. They're tunable in
site/lib/decision-tree.ts.