PCA using prcomp()
In this exercise, you will create your first PCA model and observe the diagnostic results.
We have loaded the Pokemon data from earlier, which has four dimensions, and placed it in a variable called pokemon
. Your task is to create a PCA model of the data, then to inspect the resulting model using the summary()
function.
Diese Übung ist Teil des Kurses
Unsupervised Learning in R
Anleitung zur Übung
- Create a PCA model of the data in
pokemon
, settingscale
toTRUE
. Store the result inpr.out
. - Inspect the result with the
summary()
function.
Interaktive Übung
Versuche dich an dieser Übung, indem du diesen Beispielcode vervollständigst.
# Perform scaled PCA: pr.out
# Inspect model output