I have a data-set with a decent number of attributes, half of them nominal. I used a binary vectorizer to convert the nominal attributes to numerical, but now there are far too many of them. I'm not sure how to use PCA on the data-set for the best results. Here are the three approaches I thought of:
- Load the data, remove the target variable, then run PCA on the entire data-set. The problem is my data here is non-standardized because some of it is income, some of it is age etc. It's also not scaled. I could scale it to go from 0-1 but some of the values have extremely high ranges, from 0 to 99999.
- Load the data, remove the target variable, then run PCA only on the values that i converted from being Nominal. Re-add these PCA-generated columns to the original numeric data.
- Load the data, remove the target variable, then run PCA separately for each attribute that used to be nominal, so for example run it for education-College, education-High School, generate n number of principal components, re-add to the original columns and then run it again for another ex-nominal variable, keep repeating until done.
The second approach seems the most sensible to me, but I'm not too sure. If it helps I am using Python/Pandas/Scikit-Learn for all of this.