PCA dimensionality reduction and reconstruction two-dimensional data

Beijing Institute of Technology | Ming-Jian Li

The following Python code is a companion code for the course on Artificial Intelligence and Simulation Science. It functions to reduce the dimensionality of the 1000 × 1000 surface data (with noise) in the accompanying script from 1000 features to only 20 principal components via PCA (Principal Component Analysis), and then reconstruct the original-sized surface for visualization.

The result is as follows.