A Unified Framework for Dimensionality Reduction and Classification of Hyperspectral Data