1
$\begingroup$

I have a set of 3D data points, indicated by the blue color in the picture below.

I then project them onto the x-y plane, i.e. setting z values of all the points to 0, shown by the yellow color below.

Then, I perform PCA on the 2D data points (the yellow ones).

I end up with the 1st Principal Component being the green line, and the 2nd being the yellow line.

enter image description here

As I am a newbie in PCA, I am not sure whether I have done something wrong or not.

Because in my intuitive, the 1st Principal Component should be like in the picture below:

enter image description here

I mean unlike the above picture given in wiki, my 1st component is NOT obvious and seems to make no sense. Did I do something wrong?

Edit:

To avoid the confusion, the 2D view from the above is as follows: enter image description here

$\endgroup$
8
  • $\begingroup$ Two suggestions: could you explain why you project the data onto the xy plane (PCA can be done in 3-dimensional data too!)? If the third dimension is not really important to your problem, it would be better to post 2D plots - the 3D graph is hard to read. $\endgroup$ Jul 29, 2013 at 9:14
  • $\begingroup$ @pichenettes yeah the 3rd dimension is not important to my purpose. Do u need me to post the 2D view (view from the top of x-y plane)? Thanks! $\endgroup$ Jul 29, 2013 at 9:18
  • $\begingroup$ @pichenettes please see attached $\endgroup$ Jul 29, 2013 at 9:24
  • $\begingroup$ A pure 2D view would have been better... $\endgroup$ Jul 29, 2013 at 9:41
  • $\begingroup$ @pichenettes any idea? :) $\endgroup$ Jul 29, 2013 at 9:43

1 Answer 1

1
$\begingroup$

If the PCA was correct, than green and yellow line would be perpendicular. So something is wrong with your result.

$\endgroup$
2
  • 3
    $\begingroup$ I am almost sure that the green and yellow lines are perpendicular. The x and y axes do not have the same scale; and because this is a silly 3D projection, the gray grid in the background is not reliable (parallax error). $\endgroup$ Aug 1, 2013 at 18:48
  • $\begingroup$ You are right, i missed the different scaling of the axes. $\endgroup$
    – Twonky
    Aug 4, 2013 at 9:00

Your Answer

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

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