Aan de slagGa gratis aan de slag

Interpretation of components

Now that you decided how many components you need to cover a sufficient amount of the structure in the data, you are probably curious about the meaning of these components. Which contents do they reflect? Which of the variables form a component?

The object pcaNews, which is a list of several elements, is loaded in your workspace.

Deze oefening maakt deel uit van de cursus

Machine Learning for Marketing Analytics in R

Cursus bekijken

Oefeninstructies

  • Print the loadings, which are stored in the rotation element of the pcaNews object, of component one to six, rounded to two decimals. You can choose the number of components by using the subsetting brackets [ , ].
  • As an example, we printed the loadings of the first component for you.
  • Test yourself by interpreting the first two components (you are, of course, free to take a look at more than two).

Praktische interactieve oefening

Probeer deze oefening eens door deze voorbeeldcode in te vullen.

# Print loadings of the first component
pcaNews$rotation[, 1] %>% round(2)

# Print loadings of the first six components
___[__,__] %>% round(2)
Code bewerken en uitvoeren