The algorithm calculates your top songs, albums ... To enable listening history on youriPhone and iPad, go to Settings > Apps > Music and flip the Use Listening History switch to the ON position.