I am using sklearn's PCA for use in a physical modeling problem. In this problem, the return values from PCA.fit_transform() and PCA.components_ have physical meanings. However, it seems that sklearn's PCA automatically mean centers the input data, so that the return values of PCA.fit_transform() and PCA.components_ are in mean-centered space. I realize that PCA.inverse_transform returns the original un-mean-centered input data, but it does this through np.dot(X, PCA.components_) + PCA.mean_ where X is the return value of PCA.fit_transform().
In other words, how can I alter X and PCA.components_ into X1 and PCA.components_1 by using PCA.mean_ such that np.dot(X1,pca.components_1) returns the same value as PCA.inverse_transform(X)?
There is probably a simple linear algebra solution to this but I can't seem to figure it out.