limitations of pca and how lda can help being linear methodpca has its limitations when we are faced with data that has non-linear relationships we won' go into details herebut it will suffice to say that there are extensions of pcafor example kernel pcawhich introduce non-linear transformation so that we can still use the pca approach another interesting weakness of pca that we will cover here is when it is being applied to special classification problems let us replace the followinggood ( > ( > with good > to simulate such special case and we quickly see the problem herethe classes are not distributed according to the axis with the highest variance but the one with the second highest variance clearlypca falls flat on its face as we don' provide pca with any cues regarding the class labelsit cannot do any better linear discriminant analysis (ldacomes to the rescue here it is method that tries to maximize the distance of points belonging to different classes while minimizing the distance of points of the same class we won' give any more details regarding how the underlying theory works in particularjust quick tutorial on how to use itfrom sklearn import lda lda_inst lda lda(n_components= xtrans lda_inst fit_transform(xgood