Solved – PCA loading with weights on samples

I want to run PCA on a set of data, but I'd like to weigh each row of the input matrix(i.e. each data point) based on how recent it is. In other words, in my calculations of the PCs, I'd like more recent data points to be more important. How can I achieve this?

You can do this by weighting each sample of $X$ by weight $w_i$. To do this simply multiply each data point coordinate by $sqrt{w_i}$ as seen in this answer Weighted principal components analysis

Similar Posts:

Rate this post

Leave a Comment