Dimensionality reduction for hyperspectral imagery