PCA is supervised or unsupervided algorithm
- User
PCA is supervised or unsupervided algorithm
- Assistant
PCA (Principal Component Analysis) is an unsupervised algorithm.
It is used for dimensionality reduction by identifying the directions (principal components) that maximize the variance in the data without using any labeled output or target variable.
- User
let say we have data frame with numeric and many categorical features. apply PCA on this dataset
- Assistant
PCA works only on numeric data because it relies on calculating covariance or correlation matrices. So, if you have a DataFrame with both numeric and many categorical features and you want to apply PCA, you need to preprocess the data first: