O'Reilly logo

Data Analysis with R - Second Edition by Tony Fischetti

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Exercises

Practice the following exercises to revise the concepts learned in this chapter:

  • How did we waste computation in the similarity_matrix function?
  • Both the Last.fm and the MusicBrainz API have a count value associated with each tag, which can be taken to represent the extent to which the tag applied to the artist. By ignoring this field, in both cases we implicitly used a count of 1 for every tag, making well-fitting tags just as important as relatively less well-fitting ones. Rewrite the code to take count into account, and weigh each tag proportionally to its count value. This will be challenging, but it will be invaluable for understanding the material. It will also boost your confidence as an R programmer once you finish. Go ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required