fixed a data format for input in PCA reduction