Skip to main content
14 events
when toggle format what by license comment
Jan 14, 2019 at 7:46 comment added orrymr @amoeba Thanks - I'm busy going through that answer. It makes sense, but I may have some implementation difficulties; in particular, I'm not sure I'll be able to store the previous PCA results.
Jan 11, 2019 at 17:33 history closed amoeba
kjetil b halvorsen
mdewey
Juho Kokkala
whuber r
Duplicate of I'm getting "jumpy" loadings in rollapply PCA in R. Can I fix it?
Jan 11, 2019 at 14:35 review Close votes
Jan 11, 2019 at 17:35
Jan 11, 2019 at 14:19 comment added amoeba I see! You should have mentioned time series. Then it's almost a duplicate of stats.stackexchange.com/questions/34396.
Jan 11, 2019 at 14:13 comment added Dan You can't take absolute values, that can change the span of the vector. You can multiply by a constant though (like -1). You could choose a normalization that always keeps the same direction (e.g. magnitude of 1 and positive first element, or first element equal to +1) but since you're claiming that the direction matters in your problem, it implies there is one correct normalization that is right for your problem.
Jan 11, 2019 at 13:56 comment added orrymr @ttnphns Thanks you for clearing up that terminology. I have edited my question appropriately.
Jan 11, 2019 at 13:56 history edited orrymr CC BY-SA 4.0
added 32 characters in body
Jan 11, 2019 at 13:53 comment added orrymr @amoeba I'm looking at time series data. Each month, there will be a new set of observations. Each month, I want to retrain PCA, take the first eigenvector and reduce the dimensionality of the data down to one dimension. Since the direction of that first eigenvector is arbitrary, I could potentially see spurious large changes.
Jan 11, 2019 at 13:24 comment added ttnphns Direction (sign) is arbitrary in PCA. For convenience, often program assign sign so that in each column (component) of the loading matrix the sum is positive. I'm speaking about loadings, while you call eigenvector entries "loadings", please mind.
Jan 11, 2019 at 13:24 comment added amoeba I'm still not sure why (and how!) you want to compare new model to the old model. Don't think your Q is answerable without this being clear. That said, if you want to enforce consistency between signs, you can choose the sign of the new PC such that the angle with the old PC is close to 0 and not to 180 (i.e. if the angle is large -- flip the sign).
Jan 11, 2019 at 13:10 comment added orrymr Sorry - that is unclear. It is new data that I'll be using to retrain (I've edited the question). I care about it, because if the sign changes, then I cannot directly compare to the previous results, if I multiply my original values by the loadings. I hope this makes sense?
Jan 11, 2019 at 13:09 history edited orrymr CC BY-SA 4.0
added 6 characters in body
Jan 11, 2019 at 12:24 comment added amoeba It's not quite clear what the whole process is here. You have a bunch of datasets, you take PC1 of each, and input those to some other model. OK. What do you mean "If I get new data and rerun PCA"? Why would you get new data? Is it test data to which the model will be applied? Or is it new training data that you will use to retrain the model? In the former case you should not rerun PCA. In the latter case why do you care about signs matching to what you had before?
Jan 11, 2019 at 11:36 history asked orrymr CC BY-SA 4.0