79080619

Date: 2024-10-12 09:04:39
Score: 0.5
Natty:
Report link

I think I should answer this question, quite late btw!

So, say if you are performing PCA on a dataset, which is a dimensionality reduction algorithm. And I have 100 datapoint into d-dimensional space. Just forget any training/testing thing for now. What would I do to those d-dimensional pts? I would find a line, an eigen vector, which could capture the maximum variance of those points if they are projected on that vector, it is PC. You now have a PC. Then you picks a random data point, you projects that projected point on PC, you reduced dimension of that data-point, then you trains your algo using that point and you may also save some space. Then you tries to find how much information you have lost? So you say, "well I can reconstruct that projected point", you do so, surprisingly the point you get is almost same as you had before projecting. Why so, should not it differ a lot? The reason is you included that point while making your covariance matrix. So, you comes to an idea, let's keep some points out while finding that PC. We say that in general, test data. So you did all that again and found a PC. NOW, you picks a point from test data, say t_pt, to get an idea of how much information I may lose if I uses that PC.

Step 1: We projected that point on PC, the point went from d to some c dimension.
Step 2: Then reconstruct that c-dimension point to d-dimension.

Now that new d-dimensional point should differ from the t_pt.

"how can I train on one dataset and test on another dataset?", and the answer is you uses that model, PC in our example, for prediction, but your data point may lie outside the training, but should have same number of features. You have a line!

Reasons:
  • Blacklisted phrase (0.5): how can I
  • Long answer (-1):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: MohitKumar020291