Loading the data and check shape.
The Pavia University provided dataset includes the samples as well as the ground truth.
def load_data():
'''
X - input: 3D
y - output: 2D
'''
X = loadmat('data/PaviaU.mat')['paviaU']
y = loadmat('data/PaviaU_gt.mat')['paviaU_gt']
print("X shape: ", X.shape)
print("y shape: ", y.shape)
return X, y
X, y = load_data()

To analyse HSI data I needed to remember that this image data has some differences from the regular cat, dog, human classification problem. HSI is high-dimensional and it took me a short while to wrap my head around this….
Continue reading “Part 2 – Hyperspectral Cube – Getting familiar with data exploration.”



