PCA & Clustering Confusion I have a question related to K-Means clustering and PCA. In my project, I have two target classes - 0 and 1- and I am trying to group the records that were predicted as 0 into 5 clusters.
I am using PCA strictly as a visualization technique since my data frame has 8 dimensions and I need to bring it down to 2-3 dimensions to see the clusters. My question is about the procedure I should follow~
First Way:

Extract all records with target = 0 
Do PCA and KMeans on just those records

Second way:

Do PCA on all records (target = 0 and 1) 
Extract PCA records with target = 0 (from the PCA data frame created in step 1)
Do KMeans on those records

The PCA1, PCA2, PCA3 values for the records(with target = 0) are different using these two ways. And since the PCA values are different, the cluster visualizations are also showing up differently. Which option should I follow?
Thank you so much!
My answer would be second option
I think the use of PCA is to represent original high dimensional information/data in lower dimension by calculationg the direction/axes along which there is maximum variablity in data.
In first case, where you filter for 0-labeled observations and then do PCA so PCA would measure variablity based on a smaller version of original data, and would make different axes than the second case, where the PCA would measure variablity accross entire data and hence the axes made in second case could be different. So in the first option the dataset you get after PCA is not a correct representation of high dimensional 0-labeled observations.