Using clustering over PCA to classify samples
PCA in genomics allows us to see how samples cluster. In many cases, individuals from the same population will be in the same area of the chart. But we would like to go further and predict where new individuals fall in terms of populations. To do that, we will start with PCA data, as it does dimensionality reduction – making working with the data easier – and then apply a K-Means clustering algorithm to predict where new samples fall. We will use the same dataset as in the recipe above. We will use all our samples save one to train the algorithm, and then we will predict where the remaining sample falls.
K-Means clustering can be an example of a supervised algorithm. In these types of algorithms, we need a training dataset so that the algorithm is able to learn. After training the algorithm, it will be able to predict a certain outcome for new samples. In our case, we are hoping that we can predict the population.
WARNING...