Automobile efficiency across eras

Prediction models

The source files do not all contain the same variables, so each tab keeps its own inputs and fitted models.

Dataset

Switch tabs to use the model built for that source. The calculations run locally in the browser.

UCI historical predictor

This tab uses the original 1970–1982 Auto MPG data and compares linear regression, polynomial regression, KNN, and random forest.

Estimated fuel economy

MPG

Same profile, four models

Held-out metrics from the historical notebook.

EPA bridge sample

This tab uses the smaller 1999/2008 vehicle-level sample. I use it mainly to test how well a model transfers between the two years.

Estimated combined fuel economy

MPG

Grouped and temporal tests

The temporal split trains on 1999 and predicts 2008.

EPA fleet-trend predictor

This tab predicts production-weighted fleet or vehicle-type MPG from the EPA annual trend tables. It is not an individual-car calculator.

Estimated fleet or class MPG

MPG

Model comparison

This table compares the same models on the held-out rows.

Combined-source comparison

This tab puts the bundled historical, 1999/2008, and EPA trend rows into one comparison model. The source is included as an input because the row types are different.

Estimated MPG

MPG

Model comparison

The table shows the stored test results for the same mixed-source setup.

Recent official ratings

The NRCan model uses official 1995–2026 ratings. I download those larger files when I run the recent-data script instead of storing them in the repository.