PCA: More Information

Principal Component Analysis

Principal Component Analysis is an algorithm used to reduce the dimension of your dataset. It will simplify the data down to its basic components, stripping away any unnecessary parts and leaving only its most essential features. This way, we take the parameters that matter most and ignore the ones that have little influence on the result.

How does it work?

It distributes all the data of your patients in a space with as many dimensions as variables are provided. For instance, if you upload the age, weight and height of a pacient, the algorithm will spread the points out in a 3D space. Then it draws one line for each variable the dataset has, checking how much spread out the data are on that line. The more it is, the more value that component has. In our example, it would be a line along the age, one along the weight and one along the height. Once the lines are drawn, the algorithm can delete the dimensions where the data are not spread out. That is, the variables with the least value.

An example

To understand it better, we'll take the example used before. Let's suppose that we have made a study with 13 people all of the same age. In this case, we will have 2 variables: height and weight. The algorithm will create a plane (2 variables = 2 dimensions) and it will distribute the patients on it, depending on their characteristics (height and weight). Once it is distributed, it will draw a line along each of the dimensions and, as we see in the graphic representation below, compare how spread out the data points are on each case and find which one is the most valuable. Since the patients turn out to be better spaced on the "Weight" axis rather than on the "Height" axis, the Principal Component (the one with the most value) is the weight, and therefore the algorithm will not take into account the height of the patient.

When we work with real patients, however, the algorithm will not only use weight and height, this is just an oversimplified example to have the way the algorithm works explained.