November 2017
Intermediate to advanced
1035 pages
11h 31m
English
Factor analysis is another technique we can use to reduce dimensionality. However, factor analysis makes assumptions and PCA does not. The basic assumption is that there are implicit features responsible for the features of the dataset.
This recipe will boil down to the explicit features from our samples in an attempt to understand the independent variables as much as the dependent variables.
To compare PCA and factor analysis, let's use the iris dataset again, but we'll first need to load the factor analysis class:
>>> from sklearn.decomposition import FactorAnalysis
From a programming perspective, factor analysis isn't much different from PCA:
>>> fa = FactorAnalysis(n_components=2) ...Read now
Unlock full access