A
Random Forest is an ensemble of many decision trees, each trained on a random subset of the data and a random subset of features. Every tree makes its own AQI guess from the six pollutant readings; the forest's final prediction is the
average across all of them. That averaging is what makes it work well here: pollutant-to-AQI relationships are non-linear and interact with each other (PM2.5 matters more when NO₂ is also high, for instance), individual trees can overfit noisy sensor readings, but averaging many imperfect trees cancels out that noise while keeping the non-linear pattern. It also comes with a useful side effect — the model can report which pollutants it actually leaned on, shown in the
feature importance breakdown below.
PM2.5
Fine particulate matter under 2.5 micrometers — small enough to reach deep into the lungs and bloodstream. Usually the single biggest driver of AQI.
PM10
Coarser particles — dust, pollen, construction debris. Complements PM2.5 to capture the full particulate load in the air.
NO₂
Nitrogen dioxide from vehicle and industrial combustion. Reacts in sunlight to help form ground-level ozone.
SO₂
Sulfur dioxide from burning fossil fuels, especially coal and diesel. A respiratory irritant and precursor to fine sulfate particles.
CO
Carbon monoxide from incomplete combustion. Reduces how much oxygen the blood can carry, even at moderate concentrations.
O₃
Ground-level ozone — a secondary pollutant formed when NOx and other emissions react in sunlight. Tends to peak in the afternoon.