2
$\begingroup$

I did a lot of readings about how to do PCA with train/test split. see PCA and the train/test split

I understand that we should apply the PCA on train set and then apply the same transformation to the test set. However, when it comes to logistic PCA, I have no idea:

logistic PCA treat the binary data as Bernoulli with probability p, and used ALS to optimize U and V parameters. Logistic PCA

My question is: How can I apply the same transformation to the test set? If I use the same log(p/(1-p)) transformation to test data to change them to probability, then it will be inf or 0. Then I cannot use V to project testing points to PCs.

$\endgroup$

1 Answer 1

1
$\begingroup$

When I read the paper A Generalized Linear Model for Principal Component Analysis of Binary Data, I realized that the paper itself just gave us the solution. To compute the scores matrix U for the testing data we should use the same transformation, and this transformation is V as we previously trained. So we just need to fix V and update U for testing data. Note that the process is still done by maximizing log-likelihood.

$\endgroup$
1
  • $\begingroup$ Since PCA is a data reduction/unsupervised learning teachnique that does not use Y, why does it matter that it's logistic regression? And note that sometimes you can do PCA on the whole dataset as it doesn't overfit against Y. Beware that data splitting is a noisy way to validate models if $n < 20,000$. $\endgroup$ Commented Aug 23, 2023 at 11:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.