Course project · TECHIN 513, University of Washington
Is this used car fairly priced? Wayne and I built a Chrome extension that reads a CarGurus listing, asks a model we trained, and puts a suggested price on the page. The model scored badly. Finding out why taught me more than a good score would have.
Problem
A listing price is hard to judge from the listing alone, right when a buyer needs to decide.
Bet
A second, independent number, placed on the listing itself, is more useful than a separate valuation site.
Built
A cleaning and training pipeline, three compared models, a local API, and the extension.
Lesson
Three cars out of 802 caused 96% of the squared error. Read the errors before you trust the score.
The first four numbers come from our project notebook. The last comes from re-running that notebook later, with the same code, data and random seed, to look at what the headline score was hiding.
Buyers already get a dealer's price and, on CarGurus, the site's own deal rating. We wanted an independent estimate beside them, without asking anyone to leave the page and retype a car's details. Wayne and I built each stage together.
/predict, running on our machine.We used a public Kaggle dataset of 4,009 listings: brand, model, year, mileage, fuel, engine, transmission, colors, accident history, title status and price. Most of it was text that needed cleaning before any model could read it.
The catch
3,208 columnsfor 3,207 training cars. The data holds 1,898 distinct models and 1,146 distinct engine strings, and one-hot encoding gives each its own column. Many only ever describe one or two cars, which gives a model plenty of ways to memorize instead of generalize. I can see that now. At the time, we moved on to modeling.
We trained a linear baseline and two tree ensembles on the same split. Random Forest won, narrowly, so it went into the extension. We reported the weak score as it was, and listed it as a limitation.
| Model | Average miss (MAE) | RMSE | R² |
|---|---|---|---|
| Random Forest Used in the extension | $18,999.89 | $134,823.66 | 0.11 |
| Gradient boosting | $22,564.81 | $135,548.23 | 0.10 |
| Linear regression Baseline | $19,713.61 | $137,995.02 | 0.07 |
An RMSE of $134,823 against a $19,000 average miss is a clue that a few huge errors dominate. Our own scatter plot showed them, and I did not follow up during the project. So I re-ran the notebook later, and the metrics reproduced to the cent. Then I asked which cars the error came from.
Hover or tap a dot to see the car. The same predictions appear in both charts; the second shows 790 of the 802 test cars, those with a listed and predicted price under $250K.
| Same predictions | All 802 | Without the 3 |
|---|---|---|
| R² | 0.11 | 0.70 |
| Average miss (MAE) | $18,999 | $11,310 |
| RMSE | $134,823 | $26,902 |
| Median miss | $5,710 | $5,669 |
Mileage leads, but six luxury signals in the top ten add up to 36%, more than mileage's 30.5%. Model year, which any buyer would expect to matter, sits at 3.4%. Chasing a few very expensive cars pulled the model's attention away from the ordinary cars people actually shop for.
Connecting a model to a live page exposes things a test set never will. In our demo, the Honda Accord above is listed at $14,600, and CarGurus rates it $409 below market. RevAI suggested $17,310, about $2,300 over the market figure that implies. That is one listing, not a trend, but it fits what we found next.
// Request captured in DevTools // during the demo session: a 2020 Mazda3 brand: "Mazda" model: "MAZDA3" model_year: 2020 milage: 32292 fuel_type: "Gasoline" transmission: "Automatic" ext_col: "Jet Black Mica" int_col: "Black" engine: "Unknown" accident: "None reported" clean_title: "Yes" listing_price: 0
We designed a fuller panel than the box in our demo: listed price, predicted price, a verdict and the deviation between them, plus settings. The design shows sample values, not model output. The panel is in our code, the settings are not.
One number said the model was nearly useless. Looking at individual misses told a different story, and pointed to a specific fix.
Ten minutes sorting by price would have flagged the $2.95M Quattroporte in week one. Data checks are cheap compared with what they save.
“None reported” felt like a harmless fallback in code. To a buyer, it quietly inflates the price they see. An unknown should stay unknown.
Putting the model on a live page surfaced problems that its metrics could not: broken fields, stale market data, and what a verdict needs to be trusted.