Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Predicting a continuous value per pixel instead of a category

1. Context

L07 through L10 all produced categorical or discrete output: a class per pixel, a mask per object, a change or no-change flag. This lesson introduces a different question. Pixel-level regression predicts a single continuous value for every pixel, canopy height in meters, an NDVI value between −1 and 1, a biomass density in Mg/ha, rather than choosing among a fixed set of labels.

The architectures you already know from segmentation carry over almost unchanged. What changes is the output layer, the loss function, and how you evaluate the result, all of which this lesson covers using a Landsat-to-NDVI case study.


2. Motivation

Many of the quantities that matter most in Earth science are not categorical at all. “Dense vegetation” is a far cruder answer than “NDVI of 0.72.” Canopy height, biomass, soil moisture, and population density all vary smoothly across a landscape, and forcing them into discrete bins throws away exactly the information a scientific or policy application usually needs.

Regression closes this gap. Where classification tells you what is present and segmentation tells you where, regression tells you how much of a measurable quantity exists at each location, output that plugs directly into further calculation, without the information loss of discretizing a continuous variable into categories.


3. Learning objectives

By the end of this lesson, you should be able to:


4. Lesson roadmap

  1. When regression fits — typical continuous targets, and when classification or segmentation is the better choice instead.

  2. Classification vs. regression — the conceptual shift from categorical masks to floating-point target rasters.

  3. Architectures & losses — adapting segmentation architectures for regression, and choosing MSE, MAE, or Huber loss.

  4. Data & tiles — preparing paired image and target rasters, using Landsat and NDVI as the running example.

  5. Training a regressor — the main hands-on workflow: training a U-Net regression model with geoai.

  6. Inference & temporal prediction — wall-to-wall prediction, and applying a trained model to a new year’s imagery.

  7. Evaluation & residuals — RMSE, MAE, R-squared, correlation, and reading residual maps.

  8. Project transfer — deciding whether regression fits your project, and sketching your target, data, and evaluation plan.

Pages 1–2 build the conceptual foundation, pages 3–4 cover architecture and data preparation, page 5 is the main training workflow, and pages 6–7 extend it with inference and evaluation. Page 8 transfers everything to your project.


5. Project framing

While reading this lesson, keep your own project in mind and consider:


6. Before class


7. After this lesson

After working through this lesson, you should have: