# principal component analysis

This topic is 4278 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

so im using pca to reduce the number of joints of a 3d skeletal animation; the algorithm works fine on the input I give it (as in, i get sets of eigen values, vectors and can transform my data or whatever). the problem is, im not quite sure how to use PCA to get back my 'transformed' original data less the components i drop out. this is basically whats going on: i can represent my 3d animation data in either of these two formats: A) a single angel (float) describing how far away the joint/controller is from its natural position B) euler x,y,z angels describing the rotations needed to form the joint/controller i take either A or B and throw it into a matrix. in the case of A the matrix has X1,Y1,Z1,X2,Y2,Z2,X3,Y3,Z3...... columns for all joints, and the rows correspond to my animation frames; if I use B), then its just A1, A2, A3, A4.... columns for all joints, and again the rows represent the frames. i calculate the symmetric covariance matrix for this data after subtracting the mean (per columns) from each data member. householder reduction then tridiagonal ql is used. so now, i have a bunch of eigen values and vectors, ordered from smallest to greatest: suppose i decide to not include the smallest 3 eigenvectors in my feature set. the question now is, given what I have, how do I figure out which columns of my *original data* to discard? the eigenvalues and vectors were calculated for the covariance matrix, and even if I zero out some of the eigenvectors and multiply the corresponding feature matrix by my original data.. im not left with any indication to which column of my original feature set is reasonably safe to discard. Any assistance will be greatly appreciated!

:(

##### Share on other sites
Quote:
 Original post by Uthman:(

Perhaps your summary of the problem is not enough to explain to readers what the problem is. I myself did not understand your explanation. Maybe you can provide some of the finer details?

##### Share on other sites
Now a few questions. What is PCA? Why are you using floats in prototype/testing?

[ Offtopic flames removed. --Sneftel ]

I wonder, why do you need to reduce amount of joints in skeleton animation, when a skeleton animation has the minimum amount of joints by definition.

[Edited by - Sneftel on March 27, 2007 10:28:22 AM]

##### Share on other sites
I haven't looked at this stuff for a while, but as I remember principal component analysis splits a matrix into components along its three (or whatever number of dimensions) principal axes, which are the eigenvectors returned. Thus the original matrix M is equivalent to
 ( e1 0 0 )   (          ) ( 0 e2 0 ) × ( v1 v2 v3 ) ( 0 0 e3 )   (          )

I do not see why you would want to remove one of the components in a motion situation. However I don't quite understand what you're doing.

I thought principal component analysis only worked on square matrices, which you will often not have when doing joint-by-frame stuff.

##### Share on other sites
I don't see how you could use PCA, a linear technique, to pull out hierarchical rotations. The thing is, PCA doesn't allow you to remove some of the original bases and keep others, but rather to transform into a new (smaller) basis set. You'll need different techniques for this.

EDIT: Okay, okay. You could do dot products between all the new basis vectors and all the old basis vectors, and keep the ones with the highest value of max_i dot(old_vector, new_vector_i)*eigenvalue_i. That's just off the top of my head, though. I dunno how well it would actually work, though, and it doesn't help you with the hierarchical thing.

##### Share on other sites
Quote:
 Original post by Bob JanovaI thought principal component analysis only worked on square matrices, which you will often not have when doing joint-by-frame stuff.

If I understood correctly, he calculates the covariance matrix from joint-by-frame matrix, so that it represents the covariances of the joints. That is, the result is joint-by-joint matrix which is always square and symmetric.

I could see some uses for this if one is considering the compression of such skeletal animation. However, I really don't see how the PCA is useful in selecting the joints that can be removed.

1. 1
2. 2
3. 3
4. 4
Rutin
13
5. 5

• 26
• 10
• 9
• 9
• 11
• ### Forum Statistics

• Total Topics
633696
• Total Posts
3013394
×