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?
Contents
hide
Best Answer
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:
- Solved – PCA iteratively finds directions of greatest variance; but how to find a whole subspace with greatest variance?
- Solved – proportion of variance explained in PCA?
- Solved – How does PCA represent all data with just a few principal components?
- Solved – If number of samples is smaller than number of features, how can all the variance in PCA be explained by less than $n$ components?
- Solved – What methodology does proc varclus use to reduce the number of variables