Python, Machine Learning, Data Science, Dimensionality Reduction, Towards Data Science.
Number of Components — Image by Author Now, we know how many dimensions of the HSI data should we reduce. Apply Principal Component Analysis(PCA) to the HSI data. The below code serves the purpose. After reducing the dimensions of the data the class labels are added for future purposes. The below