=== versions === python 3.12.0 | numpy 2.5.4 | pandas 3.0.6 | scikit-learn 1.9.1 | lightgbm 4.7.0 | rasterio 1.5.2 | matplotlib 3.11.2 === Step 1: AlphaEarth Foundations 2023 embeddings from Source Cooperative === 2 COGs cover the study area: file zone utm_west utm_east xrvyvkcvf8p1xhlse-0000000000-0000000000.tiff 30N 500000.0 581920.0 xrvyvkcvf8p1xhlse-0000000000-0000008192.tiff 30N 581920.0 663840.0 read the study-area windows and reprojected to EPSG:27700 in 583 s embedding cube (64, 2250, 2500) int8, 360 MB; valid pixels 100.00% sample embeddings (9000, 64); vector length min 0.991, median 1.000, max 1.007 (unit vectors up to 8-bit quantisation) Sentinel-2 seasonal features (9000, 40); missing values (no clear view) 0.88% === Step 2: tune C with blocked 5-fold CV on the training blocks === features AlphaEarth embeddings (64) Sentinel-2 seasonal bands (40) C 0.01 0.874 0.792 0.10 0.880 0.816 1.00 0.880 0.829 10.00 0.874 0.826 chosen C: AlphaEarth embeddings (64): 0.1; Sentinel-2 seasonal bands (40): 1 === Step 2b: test-block accuracy, all 6,544 training samples === features AlphaEarth embeddings (64) Sentinel-2 seasonal bands (40) classifier LightGBM (300 trees) 0.860 0.792 k-nearest neighbours (k=10) 0.819 0.738 logistic regression 0.873 0.789 confusion matrix (rows = Living England reference, columns = AlphaEarth + logistic regression): bog heath brack semin impro broad conif water built ref bog 228 22 1 6 0 0 0 0 0 ref heath 32 275 13 6 0 0 0 0 0 ref bracken 0 8 263 7 1 5 0 1 0 ref seminat_grass 3 2 5 255 104 1 0 0 0 ref improved_grass 0 1 1 31 249 0 0 0 0 ref broadleaf 0 0 4 1 2 280 22 0 7 ref conifer 0 1 0 0 0 12 106 0 1 ref water 0 2 0 0 0 0 1 134 1 ref built_bare 0 0 0 0 3 6 0 0 353 n_test producers_acc users_acc f1 Blanket bog 257 0.887 0.867 0.877 Heath 326 0.844 0.884 0.863 Bracken 285 0.923 0.916 0.920 Semi-natural grassland 370 0.689 0.833 0.754 Improved grassland 282 0.883 0.694 0.777 Broadleaf woodland 316 0.886 0.921 0.903 Conifer woodland 120 0.883 0.822 0.851 Water 138 0.971 0.993 0.982 Built-up and bare 362 0.975 0.975 0.975 overall accuracy 0.873 (n = 2,456); block-bootstrap 95% CI 0.841 to 0.902 macro F1 0.878; Cohen's kappa 0.855; Part 1 rules: OA 0.600 === Step 3: classify every pixel === predicted 5,625,000 pixels in 8 s wall-to-wall agreement with Living England: whole area 0.693; test blocks 0.700; training blocks 0.689 (Part 1 rules: 0.490 and 0.483) mean entropy 0.258; pixels with margin < 0.2: 14.9% === Step 4: few-shot learning curve (labels per class drawn from the training blocks) === test OA, logistic regression, mean of 20 random draws ('all' = every training sample, about 727 per class): features AlphaEarth embeddings (64) Sentinel-2 seasonal bands (40) per_class 5 0.720 0.630 10 0.767 0.672 25 0.812 0.721 50 0.829 0.743 100 0.850 0.767 250 0.867 0.781 all 0.875 0.789 test OA, k-nearest neighbours (k=5), mean of 20 random draws ('all' = every training sample, about 727 per class): features AlphaEarth embeddings (64) Sentinel-2 seasonal bands (40) per_class 5 0.654 0.545 10 0.702 0.606 25 0.748 0.659 50 0.773 0.687 100 0.790 0.702 250 0.806 0.721 all 0.809 0.740 s.d. across draws with 5 labels per class: logistic / AlphaEarth embeddings 0.034; kNN / AlphaEarth embeddings 0.031; logistic / Sentinel-2 seasonal bands 0.023; kNN / Sentinel-2 seasonal bands 0.031 AlphaEarth + logistic regression with 25 labels per class (0.812) already matches Sentinel-2 bands with all 6,544 training labels (0.789) === Step 5: uncertainty and calibration === test samples by margin quintile (margin = top probability - second): margin_from margin_to error_rate n lowest 0.001 0.439 0.400 492 low 0.439 0.782 0.171 491 middle 0.783 0.943 0.041 491 high 0.943 0.994 0.022 491 highest 0.994 1.000 0.002 491 expected calibration error on the pure test samples: 0.022 === Step 6: active learning, uncertainty (margin) sampling vs random sampling === test OA by number of labels (mean and s.d. over 10 runs; start 2 per class, batches of 18): mean std strategy random uncertainty random uncertainty n_labels 18 0.645 0.645 0.050 0.050 90 0.746 0.783 0.020 0.023 162 0.779 0.811 0.024 0.018 234 0.803 0.819 0.025 0.018 306 0.816 0.826 0.023 0.021 378 0.821 0.838 0.026 0.023 random sampling reaches 0.821 with 378 labels; uncertainty sampling reaches it with 270 labels === Step 7: stratified random sample of the map, area-adjusted accuracy and areas === population 5,605,307 pixels (56,053 ha); stratified sample n = 2,107 (at least 100 per mapped class, the rest proportional to mapped area; seed 42) reference = Living England 2022-23 at each sampled pixel, any reliability, no purity filter areas (ha) and the Living England census of the same population: n_sample mapped_ha adjusted_ha ci95_ha le_ha le_in_ci Blanket bog 316 8859 8663 623 9052 True Heath 433 12130 14691 718 15145 True Bracken 195 5475 4277 499 4156 True Semi-natural grassland 340 9542 9427 779 9610 True Improved grassland 345 9663 9688 731 8996 True Broadleaf woodland 149 4182 4085 462 3967 True Conifer woodland 100 1543 1702 242 1719 True Water 100 1036 966 159 839 True Built-up and bare 129 3622 2554 341 2570 True area-adjusted user's and producer's accuracy with 95% CI half-widths: users_acc ua_ci95 prod_acc pa_ci95 Blanket bog 0.744 0.048 0.760 0.041 Heath 0.873 0.031 0.721 0.031 Bracken 0.595 0.069 0.762 0.062 Semi-natural grassland 0.553 0.053 0.560 0.042 Improved grassland 0.652 0.050 0.650 0.041 Broadleaf woodland 0.671 0.076 0.687 0.062 Conifer woodland 0.810 0.077 0.734 0.093 Water 0.770 0.083 0.826 0.116 Built-up and bare 0.628 0.084 0.891 0.056 area-adjusted overall accuracy 0.698 +/- 0.019 (95% CI); compare 0.873 on the balanced, pure test samples sample points in test blocks: 616 (agreement 0.714); in training blocks: 1491 (agreement 0.698) blanket bog: mapped 8,859 ha; adjusted 8,663 ha (95% CI 8,041 to 9,286); Living England census 9,052 ha Living England census inside the 95% CI for 9 of 9 classes misuse check, the 2,456 pure test samples plugged into the same estimator: 'area-adjusted' OA 0.852; blanket bog 8,744 +/- 525 ha expected calibration error on the stratified map sample (area-weighted): 0.088 (pure test samples: 0.022) area-weighted mean confidence on the map 0.783 vs area-adjusted overall accuracy 0.698 PCA of the embeddings: first three components explain 54% of the variance (25%, 18%, 11%) saved 7 figures, habitat_alphaearth_2023.tif, margin_alphaearth_2023.tif and metrics.json to output/ total runtime 646 s