https://www.mathworks.com/help/stats/biplot.html
The use of car data and how it correlates is a good way of showing how PCA treats each variable. For example acceleration and weight are negatively correlated while displacement and horsepower are highly correlated.
I used Octave in Andrew Ng’s ML class and wanted to learn more Matlab so I signed up for a Coursera course on it.
It’s a nice tool.
Matlab is very popular in engineering. It’s simple enough to get simple things done without needing to know too much CS.
Let’s say you eat a piece of cake. You say, “hmm, salty, sweet, fruity, nice texture.” Let’s call those attributes the “principal components” of the cake from your point of view. Are there others? Maybe you could have also said “moist, or fluffy,” but you didn’t because those weren’t as obvious, so not as important.
When the cake was made, according to the recipe, there were no instructions on how to add “sweet” or “fruity.” Instead, there was a list of ingredients: sugar, vanilla, lemon juice, flour, water, baking powder, etc. The mixture of these ingredients in the quantities dictated (plus the baking) resulted in the cake having the characteristics that you described. Some of the characteristics have a strong reliance on just one or two ingredients, e.g. “sweet” with “sugar,” and some characteristics are the result of subtle combinations of many ingredients, e.g. “texture.”
The list of characteristics (principal components) definitely describe the cake, but in a more convenient and relevant way. You don’t need the whole list of ingredients to describe the cake. This is what makes principal component analysis useful.
From 2015: https://news.ycombinator.com/item?id=9040266.
From 2017: https://news.ycombinator.com/item?id=14405665.
A more recent approach to visualizing high-dimensional data is the t-SNE algorithm, which I normally use together with PCA when exploring big data sets. If you're interested in the differences between both methods, here's a really good answer: https://stats.stackexchange.com/a/249520.
I’ve used PCA a bit in the past and it’s so abstract that one forgets how to conceptualize it shortly after finishing the task. This is an interesting and memorable way to put it, I like that.
This is a strange comment since my primary usages of PCA/SVD is as a first step in understanding latent factors which are driving the data. Latent factors typically involve all of the important things that anyone running a business or deciding policy care about: customer engagement, patient well being, employee hapiness, etc all represent latent factors.
If you have ever wanted to perform data analysis and gain some exciting insight into explaining user behavior, PCA/SVD will get you there pretty quickly. It is one of the most powerful tools in my arsenal when I'm working on a project that requires interoperability.
The "loadings" in PC and the V matrix in SVD both contain information about how the original feature space correlates with the new projection. This can easily show thing things like "User's who do X,Y and NOT Z are more likely to purchase".
Likewise in LSA (Latent Semantic Analysis/indexing) on a Term-Frequency matrix you will get a first pass at semantic embedding. You'll notice, for example, that "dog" and "cat" will project onto the new space in a common PC which can be used to interpret "pets".
> I've never seen it result in a more accurate model. I could see it potentially being useful in situations where you're forced to use a linear/logistic model
PCA/SVD are a linear transformation of the data and shouldn't give you any performance increase on a linear model. However they can be very helpful in transforming extremely high dimensional, sparse vectors into lower dimensional, dense representations. This can provide a lot of storage/performance benefits.
> NNs, etc. are all able to tease out pretty complicated relationships among features on their own.
PCA is literally identical to an autoencoder minimizing the MSE with no non-linear layers. It is a very good first step towards understanding what your NN will eventually do. After all, all NNs perform a non-linear matrix transformation so that your final vector space is ultimately linearly separable.
If you like PCA and find it works in your particular domains, all the more power to you. I just don't find it practically useful for fitting better models and am generally suspicious of the insights drawn from that and other unsupervised techniques, especially given how much of the meaning of the results gets imparted by the observer who often has a particular story they'd like to tell.
We use PCA quite a lot at my quant firm do something similar to clustering in high dimensional spaces. A simple use case would be to arrange stocks so that stocks that move similarly to one another are grouped close together.
Another use case for PCA is breaking stocks down into constituent components, for example being able to express the price of a stock as a linear combination of factors: MSFT = 5% oil + 10% interest rates + 40% tech sector + ...
You can also do this for things like ETFs, where in principle an ETF is potentially made up of 100 stocks, but in practice only 10 of those stocks really determine the price, so if you're engaged in ETF market making you can hold neutral portfolio by carrying the ETF long and a small handful of stocks short.
if you know that your data comes from a stationary distribution, you can use it as a compression technique which reduces the computational demands on your model. sure, computing the initial svd or covariance matrix is expensive, but once you have it, the projection is just a matrix multiply and a vector subtraction. (with the reverse being the same)
if you have some high dimensional data and you just want to look at it, it's a pretty good start. not only does it give you a sense for whether higher dimensions are just noise (by looking at the eigenspectrums) it also makes low dimensional plots possible.
pca, cca and ica have been around for a very long time. i doubt "their time has passed."
but who knows, maybe i'm wrong.
There is something known as orthogonal regression (total least squares) which uses the same measure as PCA. Unfortunately it doesn't work well across incompatible variables.
Your goal is to create a set of orthogonal vectors, each that captures the highest amount of variance in the original data (the assumption is that variance is where the most information is).
This is achieved by performing Eigen-decomposition on the Covariance matrix of the original data. Essentially you are learning the eigenvectors of the covariance matrix, ordered by their eigenvalues.