Skip to content
Learning

Estimate car emissions using machine learning

Estimating vehicle CO₂ emissions from rated specifications

Vehicle specifications and fuel-consumption ratings provide a structured basis for an emissions estimator. This example models CO₂ emissions and examines how predictions vary within the supplied vehicle dataset.

7,385Source records
2127Final input features
1,477Test observations
0.992Test prediction R²

1. Industrial challenge

Vehicle-rating analysis can use engine characteristics and fuel-consumption ratings to estimate a corresponding CO₂ rating. The close relationship between consumption and emissions shapes how these results should be interpreted.

Vehicle specifications

Combine numerical attributes with make, model and vehicle class.

Rated emissions

Estimate the target in g/km on the prepared rating dataset.

Catalogue analysis

Use the model within its recorded specification range.

Vehicle engineeringEmissions analysisFleet research
Related vehicle variants may cross the row-based split. Hold out model families and model years to test transfer. Do not interpret directional curves as causal effects, or vary city consumption while assuming every correlated specification can remain physically unchanged. Road conditions and driving behaviour are outside this dataset.

2. Data set

The prepared dataset contains 7,385 vehicle-rating records. Inputs include make, model, vehicle class, engine characteristics and fuel consumption. Categorical expansion produces 2,127 input features. Fuel consumption and CO₂ ratings are closely linked; the result is a rating-data estimator rather than an independent measurement of road emissions.

The downloadable project, saved report and supplied source CSV define the exact version used here. Repository: original dataset/source record.

SubsetRecords
Training4431
Validation / selection1477
Testing1477
Unused0
VariableRoleTypeEncodingUnit
brandInputCategorical42 categories; see schemaAs supplied
modelInputCategorical2053 categories; see schemaAs supplied
vehicle_classInputCategorical16 categories; see schemaAs supplied
engine_sizeInputNumericL
cylindersInputNumericAs supplied
transmissionInputCategoricalA; AM; AS; AV; MAs supplied
fuel_typeInputCategoricalD; E; N; X; ZAs supplied
fuel_consumption_cityInputNumericL/100 km
fuel_consumption_hwyInputNumericAs supplied
fuel_consumption_comb(l/100km)InputNumericAs supplied
fuel_consumption_comb(mpg)InputNumericAs supplied
co2_emissionsTargetNumericg CO₂/km

Interactive chart: co2_emissions distribution. Enable JavaScript to explore it.

co2_emissions distribution. Exported with Neural Designer from the saved task report.

Interactive chart: co2_emissions Pearson correlations chart. Enable JavaScript to explore it.

co2_emissions Pearson correlations chart. Exported with Neural Designer from the saved task report.

Interactive chart: co2_emissions vs. fuel_consumption_comb(mpg) scatter chart. Enable JavaScript to explore it.

co2_emissions vs. fuel_consumption_comb(mpg) scatter chart. Exported with Neural Designer from the saved task report.
This is internal validation using the saved record-level split. Grouped or temporal independence has not been established.

3. Model

The final model has 2127 encoded input features and 1 outputs. The following dimensions describe the final saved network.

LayerInput shapeOutput shapeActivation
Scaling21272127—
Dense21273Tanh
Dense31Identity
Unscaling11—
Clamping11—

The final output is a continuous estimate. Scaling, unscaling and any bounds follow the saved implementation; the calculator does not silently impose physical constraints.

Estimating vehicle CO₂ emissions from rated specifications: initial Neural Designer architecture
Architecture used for this model; no architecture-selection experiment is recorded. Diagram labels show original variables; categorical expansion and the numeric layer dimensions are documented in the model table.

4. Training strategy

The saved training configuration uses NormalizedSquaredError with QuasiNewton. Training minimizes the recorded objective; the validation subset monitors generalization during fitting. The testing subset is used for the evaluation below.

Interactive chart: Quasi-Newton method error history. Enable JavaScript to explore it.

Quasi-Newton method error history. Exported with Neural Designer from the saved task report.

Quasi-Newton method results

MeasureValue
Epochs number199
Elapsed time00:00:32
Stopping criterionMaximum validation error increases
Training error0.006
Validation error0.004

5. Model selection

No model selection experiment is recorded in this supplied project. The displayed architecture is the trained model used for testing; earlier article claims about a different selected architecture do not apply to this version.

6. Testing analysis

The final model is evaluated on 1,477 testing observations. MAE, RMSE and prediction R² below are computed from the exact testing pairs stored by Neural Designer. Errors retain each target’s original units.

TargetUnitMAERMSEPrediction R²Pearson r²
co2_emissionsg CO₂/km2.6895.1570.9920.993

The native goodness-of-fit task reports squared Pearson correlation (r²). Prediction R² here is 1 − squared prediction error / squared deviation from the test mean. They measure different properties: a strongly correlated prediction can still have a bias or an incorrect scale.

Interactive chart: co2_emissions goodness-of-fit chart. Enable JavaScript to explore it.

co2_emissions goodness-of-fit chart. Exported with Neural Designer from the saved task report.

7. Model deployment

Validated inputs → saved preprocessing → neural network → score or estimate → domain review. The ZIP contains the original project, source CSV, schema, test metrics and standalone interactive chart exports. The project hash in the schema identifies this exact version.

Directional response at a fixed reference point

Inspect the saved reference point
MeasureVariableValue
1brandJAGUAR
2modelF-TYPE R AWD Convertible
3vehicle_classTWO-SEATER
4engine_size5
5cylinders8
6transmissionAS
7fuel_typeZ
8fuel_consumption_city15.2
9fuel_consumption_hwy9.8
10fuel_consumption_comb(l/100km)12.7
11fuel_consumption_comb(mpg)22

Interactive chart: co2_emissions – fuel_consumption_city directional output. Enable JavaScript to explore it.

co2_emissions – fuel_consumption_city directional output. Exported with Neural Designer from the saved task report. Other inputs are held at the saved reference point. This is a model response, not a causal effect.

Explore the exported model

This research demonstration runs locally in your browser. Values outside the training range are outside the validated domain and are rejected. A valid input range does not guarantee that a combination is physically or operationally plausible.

This is not a certified control or protection system.

8. Scope and limitations

Related vehicle variants may cross the row-based split. Hold out model families and model years to test transfer. Do not interpret directional curves as causal effects, or vary city consumption while assuming every correlated specification can remain physically unchanged. Road conditions and driving behaviour are outside this dataset.

No external validation or independent calibration study is included. Preprocessing statistics and model choices should be refitted within a prospective or grouped validation design. Correlations and directional responses describe associations, not causes. Human review is required before an operational decision.

References