BookmarkSubscribeRSS Feed
cophbulls
Calcite | Level 5

This is probably a reflection of my naivete but how, once running the principal component node, does one identify which dimensions (which means to me fields or variables) that the PCA selected to keep? I have fiddled with this node for a while and notice that when the max selector is taken off, in my model at least, the PCA node selects the same number of PCs that i have as input(independent) variables. Additionally in the results it has the inputs listed alphabetically and in another table has the exact same number of eigenvalues listed by value size but the naming convention is PC-1 PC-2 etc rather than the name of the field chosen.So i am guessing there is some kind of one-to-one correlation but I am not figuring out how this worked. I have a basic understanding of how PCAs work and what eigenvalues and vectors are.

3 REPLIES 3
Reeza
Super User

The method uses all variables, but transforms them via linear combinations. You can then choose to use only a certain amount of the eigenvectors in your regression, but you still need all of your original variables to create the eigenvectors.

cophbulls
Calcite | Level 5

OK,but that still doesn't answer the question of how do I know which PC is which variable when the naming convention on the PC is PC-1, PC-2 etc

WendyCzika
SAS Employee

A PC is a linear combination of the input variables, not a single variable.  You can see from the Principal Components Coefficient plot or table how each variable contributes to each PC.  Or you can view the Score Code to see the linear equation for creating each PC variable, e.g. (JOB and REASON are nominal inputs):

PC_1 =

2.4684632E-7*JOB_1_+

8.5513858E-7*JOB_2_+

9.0167328E-7*JOB_3_+

2.0593746E-6*JOB_4_+

1.6843513E-6*JOB_5_+

1.2073992E-7*JOB_6_+

2.8210926E-7*JOB_7_+

2.4579164E-7*REASON_1_+

4.0859942E-6*REASON_2_+

1.8184475E-6*REASON_3_+ ...

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to choose a machine learning algorithm

Use this tutorial as a handy guide to weigh the pros and cons of these commonly used machine learning algorithms.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 1255 views
  • 3 likes
  • 3 in conversation