I am working on a method that uses PCA analysis to transform a dataset. The dataset is constructed of 4 columns A1, A2, A3, and Class. My goal is to apply Principal Component Analysis on the dataset, and convert it into anew dataset, and save the new dataset.
A sample of the data set is given below:
A1,A2,A3,Class
2,0.4631338,1.5,3
8,0.7460648,3.0,3
6,0.264391038,2.5,2
5,0.4406713,2.3,1
2,0.410438159,1.5,3
2,0.302901816,1.5,2
6,0.275869396,2.5,3
8,0.084782428,3.0,3
The python program that I am using for this project is attached to the discussion. I've reviewed the documentation here: https://builtin.com/data-science/step-step-explanation-principal-component-analysis. The issue that I'm facing is using the PCA module to transform the original dataset into a new dataset. Any help with this would be greatly appreciated.