← Back to all sparks
M

mlr3spatial

ANALYTICS
Velocity0.0

Spatial objects within the mlr3 ecosystem

Raster prediction in mlr3 finally returns class probabilities, not just hard labels.

mlr3spatialrasterpredictioncompatibility
Current state
mlr3spatial connects mlr3 learners to raster and vector spatial data, handling chunked prediction over large rasters through DataBackendRaster. Development is slow and fix-heavy: most releases in the last two years were compatibility work against mlr3 and paradox rather than new capability. 0.7.0 is the exception.
Where it's heading
The package tracks the mlr3 core rather than leading it — 0.5.0 and 0.6.1 exist to absorb upstream changes in paradox and mlr3. Against that background, 0.7.0 adding probability predictions to predict_spatial() is the first genuine capability increase in a while, arriving alongside two DataBackendRaster fixes for multi-band sources and similarly-named layers. Cadence is roughly one release per year.
Prediction
Given the pattern, the next release is more likely to be compatibility work against a new mlr3 or terra version than another feature; further raster-backend edge cases around layer naming are the visible loose end.

Recent moves

  1. 1mo ago

    predict_spatial() gains probability predictions

    Classification learners trained with predict_type = "prob" now yield one raster layer or vector column per class, which makes uncertainty maps possible without a manual workaround. Two DataBackendRaster fixes also land, covering shared multi-band sources and partially matching layer names.

    View source ↗
  2. 10mo ago

    Compatibility with mlr3 1.2.0

    Absorbs the removal of the data format argument upstream and lets predict_newdata() and predict_spatial() work without optional coordinate column roles.

    View source ↗
  3. 1y ago

    Error on conflicting X/Y columns in sf objects

    Turns a silent ambiguity into an explicit error when an sf object already carries X and Y columns.

    View source ↗
  4. 2y ago

    Compatibility with paradox 1.0.0

    Upstream-tracking release for paradox 1.0.0 with no user-facing capability change.

    View source ↗
  5. 3y ago

    Use terra::inMemory() instead of the @ptr slot

    Internal refactor replacing a reach into terra's internals with the supported inMemory() accessor.

    View source ↗
  6. 3y ago

    spatial_predict() accepts stars, sf and Raster* inputs

    Broadens accepted input types beyond SpatRaster to stars, sf, RasterStack and RasterBrick, and renames the argument from task to newdata, aligning the call with the rest of mlr3's predict interface.

    View source ↗