DERE / metadata /train_test_mask.md
shuoxu2018's picture
Upload 45 files
e702577 verified
|
Raw
History Blame Contribute Delete
1.53 kB

train_test_mask.npy

train_test_mask.npy stores the spatial sample-selection mask used to define the GlobalMask training and testing subsets.

Array definition

shape: (360, 720)
dtype: int64
dimensions: [row, column]
spatial resolution: 0.5°

The mask contains 259,200 grid cells in total.

Mask values

Value Meaning Number of grid cells
0 Grid cell not selected 254,975
1 Training sample 3,373
2 Testing sample 852

Selected samples

training samples: 3,373
testing samples:  852
total selected:   4,225

The selected-cell counts match the sample dimensions of the released GlobalMask arrays:

GlobalMask/train: 3,373 samples
GlobalMask/test:    852 samples

Approximate selection principle

The mask represents a sparse global sample rather than all 0.5° grid cells. Candidate land grid cells were spatially subsampled at approximately every four grid cells to reduce redundancy while retaining broad geographic coverage. The selected cells were then divided into training and testing subsets at approximately an 80:20 ratio.

Grid cells not included in the sampled set are assigned 0, training cells are assigned 1, and testing cells are assigned 2.

Loading example

import numpy as np

mask = np.load("metadata/train_test_mask.npy")

train_rows, train_cols = np.where(mask == 1)
test_rows, test_cols = np.where(mask == 2)

print(mask.shape)
print(len(train_rows))
print(len(test_rows))