I have completed PCA in JMP and I'm satisfied with my results. However, when I perform PCA using scimitar-learn in python, the prediction results are quite different from JMP.
JMP Methodology: I've around 13K rows of 336 features (with no missing data). I generated 4 correlation principle components (using default settings) and predicted my target successfully by using Standard Least Squares.
Python Scikit-Learn Methodology: Same data is imported in python. First, the 336 features are standardised and scaled (by using standardscalar), and later 4 Principle components were generated using default settings. Then, target is predicted by using LinearRegression.
std_pca = make_pipeline(StandardScaler(), PCA(n_components=4), LinearRegression())
std_pca.fit(X_train, y_train)
pred = std_pca.predict(X_test)
I don't know where I'm going wrong. I need to implement this analysis via python to automate the process.
Please help!