# Imports
library(dplyr) # Data manipulation
library(tidyr) # Data tidying
library(stringr) # String manipulation
library(arules) # Association rules mining
library(arulesViz) # Visualization of association rules
library(gmodels) # CrossTable for crosstab analysis
# Set language to English and data repository path
Sys.setenv(LANGUAGE='en')
metadata_dir <- "/Users/teo/Datasets/fma/data"

Data subset description (FMA)

This project uses the Free Music Archive (FMA) dataset, specifically the tracks.csv file containing per-track metadata including:

Project Goal: Association rules mining aims to discover frequent co-occurrences of discrete items within transactions. The original tracks.csv dataset contains a mixture of categorical variables and continuous popularity indicators (e.g., number of listens or interest).

To make association rule mining applicable and interpretable, we transform selected continuous variables into discrete categories. This allows us to investigate whether certain musical genres tend to be associated with higher or lower popularity levels, exploring multiple dimensions of visibility without assuming linear or metric relationships between variables.

More information of this dataset can be found on the following links: - Github repositoy: https://github.com/mdeff/fma?tab=readme-ov-file - Website: https://freemusicarchive.org/ - Codebook paper: https://arxiv.org/abs/1612.01840

Data Preparation

Data Loading and Subset Selection

tracks_raw <- read.csv(file.path(metadata_dir, "tracks.csv"), sep = ",")

# Display dimensions
cat("Dataset dimensions:", nrow(tracks_raw), "observations of", ncol(tracks_raw), "variables\n")
## Dataset dimensions: 106576 observations of 53 variables

Header Cleaning

The CSV has a complex multi-level header structure that needs to be consolidated.

# Get column names from each row
header_group     <- colnames(tracks_raw)
header_group <- gsub("\\.\\d+$", "", header_group)
header_feature_1 <- as.character(tracks_raw[1, ])
header_feature_2 <- as.character(tracks_raw[2, ])

# Replace empty strings to manipulate them more easily after
header_group[header_group == "" | header_group == "X"] <- NA
header_feature_1[header_feature_1 == ""] <- NA
header_feature_2[header_feature_2 == ""] <- NA

# Helper function to concatenate non-NA values
clean_concat <- function(h1, h2, h3) {
  if (is.na(h1) & is.na(h2)) {
    return(h3)
  } else if (is.na(h3)) {
    return(paste(h1, h2, sep = "."))
  } else {
    return(paste(h1, h2, h3, sep = "."))
  }
}

# Combine the three headers into one
new_colnames <- mapply(
  clean_concat,
  header_group,
  header_feature_1,
  header_feature_2,
  SIMPLIFY = TRUE
)

# Clean and assign new column names
tracks_clean <- tracks_raw[-c(1, 2), ]
colnames(tracks_clean) <- new_colnames

# Extract the line with the column features
head(tracks_clean)
##   track_id album.comments  album.date_created album.date_released
## 3        2              0 2008-11-26 01:44:45 2009-01-05 00:00:00
## 4        3              0 2008-11-26 01:44:45 2009-01-05 00:00:00
## 5        5              0 2008-11-26 01:44:45 2009-01-05 00:00:00
## 6       10              0 2008-11-26 01:45:08 2008-02-06 00:00:00
## 7       20              0 2008-11-26 01:45:05 2009-01-06 00:00:00
## 8       26              0 2008-11-26 01:45:05 2009-01-06 00:00:00
##   album.engineer album.favorites album.id
## 3                              4        1
## 4                              4        1
## 5                              4        1
## 6                              4        6
## 7                              2        4
## 8                              2        4
##                           album.information album.listens album.producer
## 3                                   <p></p>          6073               
## 4                                   <p></p>          6073               
## 5                                   <p></p>          6073               
## 6                                                   47632               
## 7 <p> "spiritual songs" from Nicky Cook</p>          2710               
## 8 <p> "spiritual songs" from Nicky Cook</p>          2710               
##   album.tags          album.title album.tracks album.type
## 3         [] AWOL - A Way Of Life            7      Album
## 4         [] AWOL - A Way Of Life            7      Album
## 5         [] AWOL - A Way Of Life            7      Album
## 6         []    Constant Hitmaker            2      Album
## 7         []                Niris           13      Album
## 8         []                Niris           13      Album
##   artist.active_year_begin artist.active_year_end
## 3      2006-01-01 00:00:00                       
## 4      2006-01-01 00:00:00                       
## 5      2006-01-01 00:00:00                       
## 6                                                
## 7      1990-01-01 00:00:00    2011-01-01 00:00:00
## 8      1990-01-01 00:00:00    2011-01-01 00:00:00
##                               artist.associated_labels
## 3                                                     
## 4                                                     
## 5                                                     
## 6 Mexican Summer, Richie Records, Woodsist, Skulltones
## 7                                                     
## 8                                                     
##                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 artist.bio
## 3                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 <p>A Way Of Life, A Collective of Hip-Hop from NJ...................</p>
## 4                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 <p>A Way Of Life, A Collective of Hip-Hop from NJ...................</p>
## 5                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 <p>A Way Of Life, A Collective of Hip-Hop from NJ...................</p>
## 6 <p><span style="font-family:Verdana, Geneva, Arial;font-size:xx-small;">"Philly's Constant Hitmaker" Kurt Vile plays psychedelic experimental pop infused with a classic, folksy directness. 2008's Gulcher Records release <i>Constant Hitmaker</i> more than lives up to the name. Vile's a consistent live performer who's shared the stage with a range of sonic adventurers and avant pop-stars including Sonic Youth, Big Star, Blues Control, Magik Markers, and Ariel Pink's Haunted Graffiti.</span></p><p><span style="font-family:Verdana, Geneva, Arial;font-size:xx-small;">After a slew of limited releases on labels like Mexican Summer, Richie Records, Woodsist, and Skulltones,</span><span style="font-family:Verdana, Geneva, Arial;font-size:xx-small;"> Kurt Vile signed to Matador Records who released his first proper full-length (the Gulcher release was more of a "greatest hits"), <a title="Childish Prodigy" href="http://www.matadorrecords.com/store/index.php?catalog_id=387">Childish Prodigy</a>.<br /></span></p>
## 7                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             <p>Songs written by: Nicky Cook</p>\n<p>VOCALS, CAJON AND TABLA+ UKELELE</p>
## 8                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             <p>Songs written by: Nicky Cook</p>\n<p>VOCALS, CAJON AND TABLA+ UKELELE</p>
##   artist.comments artist.date_created artist.favorites artist.id
## 3               0 2008-11-26 01:42:32                9         1
## 4               0 2008-11-26 01:42:32                9         1
## 5               0 2008-11-26 01:42:32                9         1
## 6               3 2008-11-26 01:42:55               74         6
## 7               2 2008-11-26 01:42:52               10         4
## 8               2 2008-11-26 01:42:52               10         4
##   artist.latitude    artist.location artist.longitude
## 3      40.0583238         New Jersey      -74.4056612
## 4      40.0583238         New Jersey      -74.4056612
## 5      40.0583238         New Jersey      -74.4056612
## 6                                                    
## 7       51.895927 Colchester England         0.891874
## 8       51.895927 Colchester England         0.891874
##                                                                                                                    artist.members
## 3 Sajje Morocco,Brownbum,ZawidaGod,Custodian of Records,Zooberelli the Don,F.A.H,MadSicka,Damien Omenicci..and a van load more...
## 4 Sajje Morocco,Brownbum,ZawidaGod,Custodian of Records,Zooberelli the Don,F.A.H,MadSicka,Damien Omenicci..and a van load more...
## 5 Sajje Morocco,Brownbum,ZawidaGod,Custodian of Records,Zooberelli the Don,F.A.H,MadSicka,Damien Omenicci..and a van load more...
## 6                                                                                                        Kurt Vile, the Violators
## 7                                                                                                                    Nicky Cook\n
## 8                                                                                                                    Nicky Cook\n
##   artist.name
## 3        AWOL
## 4        AWOL
## 5        AWOL
## 6   Kurt Vile
## 7  Nicky Cook
## 8  Nicky Cook
##                                                                                                                                                                                                     artist.related_projects
## 3 The list of past projects is 2 long but every1 and every style from Tabby Bonet 2 M.O.P..Azillion Records Flagship trackmaster DJ BrownBum is a beat Wizard.....A-2-Z..illion....(right now working with JerseyBlock Ent)
## 4 The list of past projects is 2 long but every1 and every style from Tabby Bonet 2 M.O.P..Azillion Records Flagship trackmaster DJ BrownBum is a beat Wizard.....A-2-Z..illion....(right now working with JerseyBlock Ent)
## 5 The list of past projects is 2 long but every1 and every style from Tabby Bonet 2 M.O.P..Azillion Records Flagship trackmaster DJ BrownBum is a beat Wizard.....A-2-Z..illion....(right now working with JerseyBlock Ent)
## 6                                                                                                                                                                                                                          
## 7                                                                                                                                                                                                                          
## 8                                                                                                                                                                                                                          
##                                                                                                                                                                                         artist.tags
## 3                                                                                                                                                                                          ['awol']
## 4                                                                                                                                                                                          ['awol']
## 5                                                                                                                                                                                          ['awol']
## 6                                                                                                                                                                           ['philly', 'kurt vile']
## 7 ['instrumentals', 'experimental pop', 'post punk', 'experimental rock', 'soundtracks', 'lo fi', 'nicky', 'impro', 'cook', 'nicky andrews', 'ukelele', 'nicky cook', 'singer songwriter', 'tabla']
## 8 ['instrumentals', 'experimental pop', 'post punk', 'experimental rock', 'soundtracks', 'lo fi', 'nicky', 'impro', 'cook', 'nicky andrews', 'ukelele', 'nicky cook', 'singer songwriter', 'tabla']
##                            artist.website artist.wikipedia_page set.split
## 3 http://www.AzillionRecords.blogspot.com                        training
## 4 http://www.AzillionRecords.blogspot.com                        training
## 5 http://www.AzillionRecords.blogspot.com                        training
## 6                     http://kurtvile.com                        training
## 7                                                                training
## 8                                                                training
##   set.subset track.bit_rate track.comments track.composer  track.date_created
## 3      small         256000              0                2008-11-26 01:48:12
## 4     medium         256000              0                2008-11-26 01:48:14
## 5      small         256000              0                2008-11-26 01:48:20
## 6      small         192000              0      Kurt Vile 2008-11-25 17:49:06
## 7      large         256000              0                2008-11-26 01:48:56
## 8      large         256000              0                2008-11-26 01:49:05
##   track.date_recorded track.duration track.favorites track.genre_top
## 3 2008-11-26 00:00:00            168               2         Hip-Hop
## 4 2008-11-26 00:00:00            237               1         Hip-Hop
## 5 2008-11-26 00:00:00            206               6         Hip-Hop
## 6 2008-11-26 00:00:00            161             178             Pop
## 7 2008-01-01 00:00:00            311               0                
## 8 2008-01-01 00:00:00            181               0                
##   track.genres  track.genres_all track.information track.interest
## 3         [21]              [21]                             4656
## 4         [21]              [21]                             1470
## 5         [21]              [21]                             1933
## 6         [10]              [10]                            54881
## 7    [76, 103] [17, 10, 76, 103]                              978
## 8    [76, 103] [17, 10, 76, 103]                             1060
##   track.language_code
## 3                  en
## 4                  en
## 5                  en
## 6                  en
## 7                  en
## 8                  en
##                                                                   track.license
## 3                        Attribution-NonCommercial-ShareAlike 3.0 International
## 4                        Attribution-NonCommercial-ShareAlike 3.0 International
## 5                        Attribution-NonCommercial-ShareAlike 3.0 International
## 6 Attribution-NonCommercial-NoDerivatives (aka Music Sharing) 3.0 International
## 7 Attribution-NonCommercial-NoDerivatives (aka Music Sharing) 3.0 International
## 8 Attribution-NonCommercial-NoDerivatives (aka Music Sharing) 3.0 International
##   track.listens track.lyricist track.number track.publisher track.tags
## 3          1293                           3                         []
## 4           514                           4                         []
## 5          1151                           6                         []
## 6         50135                           1                         []
## 7           361                           3                         []
## 8           193                           4                         []
##           track.title
## 3                Food
## 4        Electric Ave
## 5          This World
## 6             Freeway
## 7     Spiritual Level
## 8 Where is your Love?

Feature Selection

We focus on features that can provide meaningful transaction items:

Categorical variables: - track.genre_all - track.language_code

Continuous variables to discretize: - track.listens: Number of listens

tracks_sel <- tracks_clean %>%
  select(
    track.genres_all,
    track.language_code,
    track.listens
  )

# Remove rows with empty values
tracks_sel <- tracks_sel %>%
  mutate(
    track.genres_all = na_if(track.genres_all, ""),
    track.language_code = na_if(track.language_code, ""),
    track.listens = na_if(track.listens, "")
  )

tracks_sel <- tracks_sel %>%
  filter(
    !is.na(track.genres_all),
    !is.na(track.language_code),
    !is.na(track.listens)
  )

head(tracks_sel)
##    track.genres_all track.language_code track.listens
## 1              [21]                  en          1293
## 2              [21]                  en           514
## 3              [21]                  en          1151
## 4              [10]                  en         50135
## 5 [17, 10, 76, 103]                  en           361
## 6 [17, 10, 76, 103]                  en           193

Only tracks with complete information for the selected variables are retained to avoid ambiguous transactions.

Data Type Conversion

# Convert to appropriate data types
tracks_sel <- tracks_sel %>%
  mutate(
    track.listens = as.numeric(track.listens)
  )

str(tracks_sel)
## 'data.frame':    15024 obs. of  3 variables:
##  $ track.genres_all   : chr  "[21]" "[21]" "[21]" "[10]" ...
##  $ track.language_code: chr  "en" "en" "en" "en" ...
##  $ track.listens      : num  1293 514 1151 50135 361 ...

Discretization of Continuous Variables

Before discretizing, we examine the distribution of the continuous popularity indicators.

summary(tracks_sel$track.listens)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##       5     210     489    1423    1182  325940

The data shows the wrong type (character instead of factors). We need to convert the continuous variables to numeric and the categorical ones to factors.

Here, we discretize the continuous popularity indicators into three categories (low, medium, high) based on quantiles. This allows us to capture relative popularity levels without assuming specific thresholds.

tracks_disc <- tracks_sel %>%
  mutate(
    listens = cut(
      track.listens,
      breaks = quantile(track.listens, probs = c(0, 0.33, 0.66, 1)),
      labels = c("low", "medium", "high"),
      include.lowest = TRUE)) %>% 
  select(-track.listens) %>%
  rename(genres = track.genres_all,
         language = track.language_code)

head(tracks_disc)
##              genres language listens
## 1              [21]       en    high
## 2              [21]       en  medium
## 3              [21]       en    high
## 4              [10]       en    high
## 5 [17, 10, 76, 103]       en  medium
## 6 [17, 10, 76, 103]       en     low

Separate the genres and find their corresponding name

tracks_disc <- tracks_disc %>%
  mutate(
    genres = na_if(genres, ""),
    genres = str_remove_all(genres, "\\[|\\]")
  ) %>%
  filter(!is.na(genres)) %>% 
  separate_rows(genres, sep = ",") %>%
  mutate(
    genre_id = as.integer(str_trim(genres))
  )
genres <- read.csv(file.path(metadata_dir, "genres.csv"), sep = ",") %>%
  select(genre_id, title)
tracks_disc <- tracks_disc %>%
  left_join(genres, by = "genre_id") %>%
  filter(!is.na(title)) %>%
  mutate(genre = as.factor(title),
         language = as.factor(language)) %>% 
  select(-genres, -genre_id, -title)

tracks_disc
## # A tibble: 40,793 × 3
##    language listens genre            
##    <fct>    <fct>   <fct>            
##  1 en       high    Hip-Hop          
##  2 en       medium  Hip-Hop          
##  3 en       high    Hip-Hop          
##  4 en       high    Pop              
##  5 en       medium  Folk             
##  6 en       medium  Pop              
##  7 en       medium  Experimental Pop 
##  8 en       medium  Singer-Songwriter
##  9 en       low     Folk             
## 10 en       low     Pop              
## # ℹ 40,783 more rows

Transaction Creation

One transaction = a list of textual items, not a list of numerical values.

tracks_disc
## # A tibble: 40,793 × 3
##    language listens genre            
##    <fct>    <fct>   <fct>            
##  1 en       high    Hip-Hop          
##  2 en       medium  Hip-Hop          
##  3 en       high    Hip-Hop          
##  4 en       high    Pop              
##  5 en       medium  Folk             
##  6 en       medium  Pop              
##  7 en       medium  Experimental Pop 
##  8 en       medium  Singer-Songwriter
##  9 en       low     Folk             
## 10 en       low     Pop              
## # ℹ 40,783 more rows

Data Inspection

tracks_basket <- as(tracks_disc, "transactions")
inspect(tracks_basket[1:3])
##     items                                        transactionID
## [1] {language=en, listens=high, genre=Hip-Hop}   1            
## [2] {language=en, listens=medium, genre=Hip-Hop} 2            
## [3] {language=en, listens=high, genre=Hip-Hop}   3

Item Frequency Analysis

item_freq <- itemFrequency(tracks_basket)
head(item_freq, decreasing = TRUE)
##  language=ar  language=az  language=bg  language=bm  language=cs  language=de 
## 8.334763e-04 9.805604e-05 3.431961e-04 7.354203e-05 3.922242e-04 4.755718e-03

The most frequent items in the dataset are specific language-genre combinations, with English language tracks being dominant.

item_freq <- base::sort(item_freq, decreasing=T)[0:20]
par(mar = c(10, 4, 2, 1))  # plus de place en bas
barplot(
  item_freq,
  las = 2,
  cex.names = 0.8
)

Cross-tabulation Analysis

CrossTable(tracks_disc$genre, tracks_disc$listens)
## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## | Chi-square contribution |
## |           N / Row Total |
## |           N / Col Total |
## |         N / Table Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  40793 
## 
##  
##                          | tracks_disc$listens 
##        tracks_disc$genre |       low |    medium |      high | Row Total | 
## -------------------------|-----------|-----------|-----------|-----------|
##   20th Century Classical |         0 |         4 |        56 |        60 | 
##                          |    17.494 |    12.905 |    50.418 |           | 
##                          |     0.000 |     0.067 |     0.933 |     0.001 | 
##                          |     0.000 |     0.000 |     0.004 |           | 
##                          |     0.000 |     0.000 |     0.001 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                  African |         0 |         0 |        57 |        57 | 
##                          |    16.619 |    19.104 |    59.979 |           | 
##                          |     0.000 |     0.000 |     1.000 |     0.001 | 
##                          |     0.000 |     0.000 |     0.004 |           | 
##                          |     0.000 |     0.000 |     0.001 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                 Afrobeat |         0 |         0 |         5 |         5 | 
##                          |     1.458 |     1.676 |     5.261 |           | 
##                          |     0.000 |     0.000 |     1.000 |     0.000 | 
##                          |     0.000 |     0.000 |     0.000 |           | 
##                          |     0.000 |     0.000 |     0.000 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##      Alternative Hip-Hop |        29 |        34 |        57 |       120 | 
##                          |     1.025 |     0.962 |     3.327 |           | 
##                          |     0.242 |     0.283 |     0.475 |     0.003 | 
##                          |     0.002 |     0.002 |     0.004 |           | 
##                          |     0.001 |     0.001 |     0.001 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                  Ambient |        10 |       103 |       173 |       286 | 
##                          |    64.588 |     0.533 |    41.105 |           | 
##                          |     0.035 |     0.360 |     0.605 |     0.007 | 
##                          |     0.001 |     0.008 |     0.011 |           | 
##                          |     0.000 |     0.003 |     0.004 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##       Ambient Electronic |        61 |       191 |       125 |       377 | 
##                          |    21.773 |    33.075 |     1.757 |           | 
##                          |     0.162 |     0.507 |     0.332 |     0.009 | 
##                          |     0.005 |     0.014 |     0.008 |           | 
##                          |     0.001 |     0.005 |     0.003 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                Americana |         2 |        40 |       109 |       151 | 
##                          |    40.118 |     2.224 |    49.153 |           | 
##                          |     0.013 |     0.265 |     0.722 |     0.004 | 
##                          |     0.000 |     0.003 |     0.007 |           | 
##                          |     0.000 |     0.001 |     0.003 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##            Asia-Far East |         0 |         0 |        29 |        29 | 
##                          |     8.456 |     9.720 |    30.516 |           | 
##                          |     0.000 |     0.000 |     1.000 |     0.001 | 
##                          |     0.000 |     0.000 |     0.002 |           | 
##                          |     0.000 |     0.000 |     0.001 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##            Audio Collage |       127 |        80 |        80 |       287 | 
##                          |    22.426 |     2.725 |     6.870 |           | 
##                          |     0.443 |     0.279 |     0.279 |     0.007 | 
##                          |     0.011 |     0.006 |     0.005 |           | 
##                          |     0.003 |     0.002 |     0.002 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##              Avant-Garde |       516 |       329 |       291 |      1136 | 
##                          |   103.080 |     7.030 |    41.741 |           | 
##                          |     0.454 |     0.290 |     0.256 |     0.028 | 
##                          |     0.043 |     0.024 |     0.019 |           | 
##                          |     0.013 |     0.008 |     0.007 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                   Balkan |         0 |        22 |        61 |        83 | 
##                          |    24.200 |     1.217 |    29.085 |           | 
##                          |     0.000 |     0.265 |     0.735 |     0.002 | 
##                          |     0.000 |     0.002 |     0.004 |           | 
##                          |     0.000 |     0.001 |     0.001 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                   Banter |         0 |         0 |         4 |         4 | 
##                          |     1.166 |     1.341 |     4.209 |           | 
##                          |     0.000 |     0.000 |     1.000 |     0.000 | 
##                          |     0.000 |     0.000 |     0.000 |           | 
##                          |     0.000 |     0.000 |     0.000 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##           Big Band/Swing |         0 |         0 |        19 |        19 | 
##                          |     5.540 |     6.368 |    19.993 |           | 
##                          |     0.000 |     0.000 |     1.000 |     0.000 | 
##                          |     0.000 |     0.000 |     0.001 |           | 
##                          |     0.000 |     0.000 |     0.000 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                  Bigbeat |         0 |         0 |        11 |        11 | 
##                          |     3.207 |     3.687 |    11.575 |           | 
##                          |     0.000 |     0.000 |     1.000 |     0.000 | 
##                          |     0.000 |     0.000 |     0.001 |           | 
##                          |     0.000 |     0.000 |     0.000 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##              Black-Metal |         0 |         8 |        12 |        20 | 
##                          |     5.831 |     0.251 |     2.754 |           | 
##                          |     0.000 |     0.400 |     0.600 |     0.000 | 
##                          |     0.000 |     0.001 |     0.001 |           | 
##                          |     0.000 |     0.000 |     0.000 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                Bluegrass |         0 |         0 |        87 |        87 | 
##                          |    25.367 |    29.159 |    91.547 |           | 
##                          |     0.000 |     0.000 |     1.000 |     0.002 | 
##                          |     0.000 |     0.000 |     0.006 |           | 
##                          |     0.000 |     0.000 |     0.002 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                    Blues |         0 |        12 |       150 |       162 | 
##                          |    47.234 |    32.947 |   132.553 |           | 
##                          |     0.000 |     0.074 |     0.926 |     0.004 | 
##                          |     0.000 |     0.001 |     0.010 |           | 
##                          |     0.000 |     0.000 |     0.004 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                Brazilian |         0 |         3 |        72 |        75 | 
##                          |    21.868 |    19.495 |    69.167 |           | 
##                          |     0.000 |     0.040 |     0.960 |     0.002 | 
##                          |     0.000 |     0.000 |     0.005 |           | 
##                          |     0.000 |     0.000 |     0.002 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                Breakbeat |         4 |         2 |         1 |         7 | 
##                          |     1.880 |     0.051 |     0.996 |           | 
##                          |     0.571 |     0.286 |     0.143 |     0.000 | 
##                          |     0.000 |     0.000 |     0.000 |           | 
##                          |     0.000 |     0.000 |     0.000 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##         Breakcore - Hard |         9 |        36 |        32 |        77 | 
##                          |     8.059 |     4.026 |     0.369 |           | 
##                          |     0.117 |     0.468 |     0.416 |     0.002 | 
##                          |     0.001 |     0.003 |     0.002 |           | 
##                          |     0.000 |     0.001 |     0.001 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##             British Folk |         0 |         3 |        15 |        18 | 
##                          |     5.248 |     1.525 |    10.206 |           | 
##                          |     0.000 |     0.167 |     0.833 |     0.000 | 
##                          |     0.000 |     0.000 |     0.001 |           | 
##                          |     0.000 |     0.000 |     0.000 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                   Celtic |         0 |         0 |        15 |        15 | 
##                          |     4.374 |     5.027 |    15.784 |           | 
##                          |     0.000 |     0.000 |     1.000 |     0.000 | 
##                          |     0.000 |     0.000 |     0.001 |           | 
##                          |     0.000 |     0.000 |     0.000 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                Chill-out |         0 |         0 |        11 |        11 | 
##                          |     3.207 |     3.687 |    11.575 |           | 
##                          |     0.000 |     0.000 |     1.000 |     0.000 | 
##                          |     0.000 |     0.000 |     0.001 |           | 
##                          |     0.000 |     0.000 |     0.000 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##               Chip Music |        18 |       117 |       132 |       267 | 
##                          |    46.011 |     8.459 |    10.491 |           | 
##                          |     0.067 |     0.438 |     0.494 |     0.007 | 
##                          |     0.002 |     0.009 |     0.009 |           | 
##                          |     0.000 |     0.003 |     0.003 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                 Chiptune |         0 |        45 |        55 |       100 | 
##                          |    29.157 |     3.935 |     8.367 |           | 
##                          |     0.000 |     0.450 |     0.550 |     0.002 | 
##                          |     0.000 |     0.003 |     0.004 |           | 
##                          |     0.000 |     0.001 |     0.001 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##             Choral Music |         0 |        16 |        30 |        46 | 
##                          |    13.412 |     0.022 |     9.586 |           | 
##                          |     0.000 |     0.348 |     0.652 |     0.001 | 
##                          |     0.000 |     0.001 |     0.002 |           | 
##                          |     0.000 |     0.000 |     0.001 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                Christmas |         0 |         0 |         4 |         4 | 
##                          |     1.166 |     1.341 |     4.209 |           | 
##                          |     0.000 |     0.000 |     1.000 |     0.000 | 
##                          |     0.000 |     0.000 |     0.000 |           | 
##                          |     0.000 |     0.000 |     0.000 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                Classical |         0 |        28 |       336 |       364 | 
##                          |   106.131 |    72.423 |   294.771 |           | 
##                          |     0.000 |     0.077 |     0.923 |     0.009 | 
##                          |     0.000 |     0.002 |     0.022 |           | 
##                          |     0.000 |     0.001 |     0.008 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                   Comedy |         0 |        13 |        42 |        55 | 
##                          |    16.036 |     1.602 |    22.453 |           | 
##                          |     0.000 |     0.236 |     0.764 |     0.001 | 
##                          |     0.000 |     0.001 |     0.003 |           | 
##                          |     0.000 |     0.000 |     0.001 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##              Compilation |        36 |        35 |        14 |        85 | 
##                          |     5.076 |     1.488 |     9.906 |           | 
##                          |     0.424 |     0.412 |     0.165 |     0.002 | 
##                          |     0.003 |     0.003 |     0.001 |           | 
##                          |     0.001 |     0.001 |     0.000 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##           Composed Music |         0 |         4 |        75 |        79 | 
##                          |    23.034 |    19.082 |    70.240 |           | 
##                          |     0.000 |     0.051 |     0.949 |     0.002 | 
##                          |     0.000 |     0.000 |     0.005 |           | 
##                          |     0.000 |     0.000 |     0.002 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##   Contemporary Classical |         0 |         0 |         4 |         4 | 
##                          |     1.166 |     1.341 |     4.209 |           | 
##                          |     0.000 |     0.000 |     1.000 |     0.000 | 
##                          |     0.000 |     0.000 |     0.000 |           | 
##                          |     0.000 |     0.000 |     0.000 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                  Country |         2 |        70 |       212 |       284 | 
##                          |    78.854 |     6.663 |   105.970 |           | 
##                          |     0.007 |     0.246 |     0.746 |     0.007 | 
##                          |     0.000 |     0.005 |     0.014 |           | 
##                          |     0.000 |     0.002 |     0.005 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                   Cumbia |         0 |         0 |         1 |         1 | 
##                          |     0.292 |     0.335 |     1.052 |           | 
##                          |     0.000 |     0.000 |     1.000 |     0.000 | 
##                          |     0.000 |     0.000 |     0.000 |           | 
##                          |     0.000 |     0.000 |     0.000 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                    Dance |         3 |       116 |       127 |       246 | 
##                          |    65.852 |    13.654 |    13.474 |           | 
##                          |     0.012 |     0.472 |     0.516 |     0.006 | 
##                          |     0.000 |     0.008 |     0.008 |           | 
##                          |     0.000 |     0.003 |     0.003 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##              Death-Metal |         0 |         0 |         5 |         5 | 
##                          |     1.458 |     1.676 |     5.261 |           | 
##                          |     0.000 |     0.000 |     1.000 |     0.000 | 
##                          |     0.000 |     0.000 |     0.000 |           | 
##                          |     0.000 |     0.000 |     0.000 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                Deep Funk |         0 |         0 |         1 |         1 | 
##                          |     0.292 |     0.335 |     1.052 |           | 
##                          |     0.000 |     0.000 |     1.000 |     0.000 | 
##                          |     0.000 |     0.000 |     0.000 |           | 
##                          |     0.000 |     0.000 |     0.000 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                    Disco |         0 |        31 |        67 |        98 | 
##                          |    28.574 |     0.104 |    25.295 |           | 
##                          |     0.000 |     0.316 |     0.684 |     0.002 | 
##                          |     0.000 |     0.002 |     0.004 |           | 
##                          |     0.000 |     0.001 |     0.002 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                Downtempo |         0 |         1 |         1 |         2 | 
##                          |     0.583 |     0.162 |     0.086 |           | 
##                          |     0.000 |     0.500 |     0.500 |     0.000 | 
##                          |     0.000 |     0.000 |     0.000 |           | 
##                          |     0.000 |     0.000 |     0.000 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                    Drone |        19 |        86 |        62 |       167 | 
##                          |    18.106 |    16.111 |     0.002 |           | 
##                          |     0.114 |     0.515 |     0.371 |     0.004 | 
##                          |     0.002 |     0.006 |     0.004 |           | 
##                          |     0.000 |     0.002 |     0.002 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##              Drum & Bass |         0 |         0 |         3 |         3 | 
##                          |     0.875 |     1.005 |     3.157 |           | 
##                          |     0.000 |     0.000 |     1.000 |     0.000 | 
##                          |     0.000 |     0.000 |     0.000 |           | 
##                          |     0.000 |     0.000 |     0.000 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                  Dubstep |         0 |        19 |        52 |        71 | 
##                          |    20.701 |     0.967 |    24.531 |           | 
##                          |     0.000 |     0.268 |     0.732 |     0.002 | 
##                          |     0.000 |     0.001 |     0.003 |           | 
##                          |     0.000 |     0.000 |     0.001 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##           Easy Listening |         3 |         8 |        48 |        59 | 
##                          |    11.726 |     7.011 |    30.640 |           | 
##                          |     0.051 |     0.136 |     0.814 |     0.001 | 
##                          |     0.000 |     0.001 |     0.003 |           | 
##                          |     0.000 |     0.000 |     0.001 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##    Easy Listening: Vocal |         2 |         2 |         0 |         4 | 
##                          |     0.596 |     0.324 |     1.493 |           | 
##                          |     0.500 |     0.500 |     0.000 |     0.000 | 
##                          |     0.000 |     0.000 |     0.000 |           | 
##                          |     0.000 |     0.000 |     0.000 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##             Electro-Punk |        22 |        83 |        37 |       142 | 
##                          |     9.093 |    26.343 |     4.833 |           | 
##                          |     0.155 |     0.585 |     0.261 |     0.003 | 
##                          |     0.002 |     0.006 |     0.002 |           | 
##                          |     0.001 |     0.002 |     0.001 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##          Electroacoustic |       100 |        99 |       117 |       316 | 
##                          |     0.671 |     0.451 |     0.008 |           | 
##                          |     0.316 |     0.313 |     0.370 |     0.008 | 
##                          |     0.008 |     0.007 |     0.008 |           | 
##                          |     0.002 |     0.002 |     0.003 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##               Electronic |       811 |      1297 |      1277 |      3385 | 
##                          |    31.372 |    23.275 |     0.143 |           | 
##                          |     0.240 |     0.383 |     0.377 |     0.083 | 
##                          |     0.068 |     0.095 |     0.084 |           | 
##                          |     0.020 |     0.032 |     0.031 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                   Europe |         1 |        18 |        94 |       113 | 
##                          |    30.978 |    10.428 |    63.663 |           | 
##                          |     0.009 |     0.159 |     0.832 |     0.003 | 
##                          |     0.000 |     0.001 |     0.006 |           | 
##                          |     0.000 |     0.000 |     0.002 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##             Experimental |      1838 |      1316 |      1176 |      4330 | 
##                          |   262.341 |    12.600 |   119.934 |           | 
##                          |     0.424 |     0.304 |     0.272 |     0.106 | 
##                          |     0.155 |     0.096 |     0.077 |           | 
##                          |     0.045 |     0.032 |     0.029 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##         Experimental Pop |       296 |       463 |       315 |      1074 | 
##                          |     0.939 |    29.498 |    18.405 |           | 
##                          |     0.276 |     0.431 |     0.293 |     0.026 | 
##                          |     0.025 |     0.034 |     0.021 |           | 
##                          |     0.007 |     0.011 |     0.008 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                     Fado |         0 |         0 |         1 |         1 | 
##                          |     0.292 |     0.335 |     1.052 |           | 
##                          |     0.000 |     0.000 |     1.000 |     0.000 | 
##                          |     0.000 |     0.000 |     0.000 |           | 
##                          |     0.000 |     0.000 |     0.000 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##         Field Recordings |       182 |        57 |        32 |       271 | 
##                          |   134.225 |    12.598 |    47.280 |           | 
##                          |     0.672 |     0.210 |     0.118 |     0.007 | 
##                          |     0.015 |     0.004 |     0.002 |           | 
##                          |     0.004 |     0.001 |     0.001 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                 Flamenco |         0 |         0 |         1 |         1 | 
##                          |     0.292 |     0.335 |     1.052 |           | 
##                          |     0.000 |     0.000 |     1.000 |     0.000 | 
##                          |     0.000 |     0.000 |     0.000 |           | 
##                          |     0.000 |     0.000 |     0.000 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                     Folk |       444 |       710 |       829 |      1983 | 
##                          |    31.141 |     3.099 |    10.652 |           | 
##                          |     0.224 |     0.358 |     0.418 |     0.049 | 
##                          |     0.037 |     0.052 |     0.054 |           | 
##                          |     0.011 |     0.017 |     0.020 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##               Freak-Folk |        10 |        19 |        23 |        52 | 
##                          |     1.757 |     0.142 |     0.664 |           | 
##                          |     0.192 |     0.365 |     0.442 |     0.001 | 
##                          |     0.001 |     0.001 |     0.002 |           | 
##                          |     0.000 |     0.000 |     0.001 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                Free-Folk |        20 |        45 |        27 |        92 | 
##                          |     1.736 |     6.508 |     1.569 |           | 
##                          |     0.217 |     0.489 |     0.293 |     0.002 | 
##                          |     0.002 |     0.003 |     0.002 |           | 
##                          |     0.000 |     0.001 |     0.001 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                Free-Jazz |        26 |        89 |       135 |       250 | 
##                          |    30.166 |     0.324 |    18.617 |           | 
##                          |     0.104 |     0.356 |     0.540 |     0.006 | 
##                          |     0.002 |     0.007 |     0.009 |           | 
##                          |     0.001 |     0.002 |     0.003 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                   French |         0 |         0 |        11 |        11 | 
##                          |     3.207 |     3.687 |    11.575 |           | 
##                          |     0.000 |     0.000 |     1.000 |     0.000 | 
##                          |     0.000 |     0.000 |     0.001 |           | 
##                          |     0.000 |     0.000 |     0.000 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                     Funk |         0 |         1 |        43 |        44 | 
##                          |    12.829 |    12.815 |    43.003 |           | 
##                          |     0.000 |     0.023 |     0.977 |     0.001 | 
##                          |     0.000 |     0.000 |     0.003 |           | 
##                          |     0.000 |     0.000 |     0.001 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                   Garage |       177 |       169 |       130 |       476 | 
##                          |    10.521 |     0.562 |    12.794 |           | 
##                          |     0.372 |     0.355 |     0.273 |     0.012 | 
##                          |     0.015 |     0.012 |     0.009 |           | 
##                          |     0.004 |     0.004 |     0.003 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                   Glitch |        15 |        59 |        34 |       108 | 
##                          |     8.635 |    14.366 |     0.989 |           | 
##                          |     0.139 |     0.546 |     0.315 |     0.003 | 
##                          |     0.001 |     0.004 |     0.002 |           | 
##                          |     0.000 |     0.001 |     0.001 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                     Goth |         0 |         7 |        15 |        22 | 
##                          |     6.415 |     0.019 |     5.611 |           | 
##                          |     0.000 |     0.318 |     0.682 |     0.001 | 
##                          |     0.000 |     0.001 |     0.001 |           | 
##                          |     0.000 |     0.000 |     0.000 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                Grindcore |         1 |         6 |         3 |        10 | 
##                          |     1.259 |     2.093 |     0.144 |           | 
##                          |     0.100 |     0.600 |     0.300 |     0.000 | 
##                          |     0.000 |     0.000 |     0.000 |           | 
##                          |     0.000 |     0.000 |     0.000 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                 Hardcore |        67 |        51 |        44 |       162 | 
##                          |     8.271 |     0.200 |     4.486 |           | 
##                          |     0.414 |     0.315 |     0.272 |     0.004 | 
##                          |     0.006 |     0.004 |     0.003 |           | 
##                          |     0.002 |     0.001 |     0.001 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                  Hip-Hop |       233 |       285 |       371 |       889 | 
##                          |     2.649 |     0.563 |     4.621 |           | 
##                          |     0.262 |     0.321 |     0.417 |     0.022 | 
##                          |     0.020 |     0.021 |     0.024 |           | 
##                          |     0.006 |     0.007 |     0.009 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##            Hip-Hop Beats |         0 |         0 |         3 |         3 | 
##                          |     0.875 |     1.005 |     3.157 |           | 
##                          |     0.000 |     0.000 |     1.000 |     0.000 | 
##                          |     0.000 |     0.000 |     0.000 |           | 
##                          |     0.000 |     0.000 |     0.000 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                  Holiday |         1 |         5 |        27 |        33 | 
##                          |     7.726 |     3.321 |    17.499 |           | 
##                          |     0.030 |     0.152 |     0.818 |     0.001 | 
##                          |     0.000 |     0.000 |     0.002 |           | 
##                          |     0.000 |     0.000 |     0.001 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                    House |         0 |         8 |        69 |        77 | 
##                          |    22.451 |    12.287 |    56.387 |           | 
##                          |     0.000 |     0.104 |     0.896 |     0.002 | 
##                          |     0.000 |     0.001 |     0.005 |           | 
##                          |     0.000 |     0.000 |     0.002 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                      IDM |         8 |         4 |        21 |        33 | 
##                          |     0.273 |     4.507 |     6.119 |           | 
##                          |     0.242 |     0.121 |     0.636 |     0.001 | 
##                          |     0.001 |     0.000 |     0.001 |           | 
##                          |     0.000 |     0.000 |     0.001 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                   Improv |       203 |       152 |       110 |       465 | 
##                          |    33.526 |     0.095 |    23.284 |           | 
##                          |     0.437 |     0.327 |     0.237 |     0.011 | 
##                          |     0.017 |     0.011 |     0.007 |           | 
##                          |     0.005 |     0.004 |     0.003 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                   Indian |         0 |         0 |        17 |        17 | 
##                          |     4.957 |     5.698 |    17.889 |           | 
##                          |     0.000 |     0.000 |     1.000 |     0.000 | 
##                          |     0.000 |     0.000 |     0.001 |           | 
##                          |     0.000 |     0.000 |     0.000 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##               Indie-Rock |       289 |       359 |       236 |       884 | 
##                          |     3.789 |    13.278 |    26.764 |           | 
##                          |     0.327 |     0.406 |     0.267 |     0.022 | 
##                          |     0.024 |     0.026 |     0.015 |           | 
##                          |     0.007 |     0.009 |     0.006 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##               Industrial |        24 |        42 |        47 |       113 | 
##                          |     2.430 |     0.450 |     0.551 |           | 
##                          |     0.212 |     0.372 |     0.416 |     0.003 | 
##                          |     0.002 |     0.003 |     0.003 |           | 
##                          |     0.001 |     0.001 |     0.001 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##             Instrumental |        46 |       142 |       360 |       548 | 
##                          |    81.023 |     9.452 |   118.126 |           | 
##                          |     0.084 |     0.259 |     0.657 |     0.013 | 
##                          |     0.004 |     0.010 |     0.024 |           | 
##                          |     0.001 |     0.003 |     0.009 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##            International |        19 |       101 |       575 |       695 | 
##                          |   166.422 |    74.727 |   383.874 |           | 
##                          |     0.027 |     0.145 |     0.827 |     0.017 | 
##                          |     0.002 |     0.007 |     0.038 |           | 
##                          |     0.000 |     0.002 |     0.014 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                Interview |        25 |        11 |         4 |        40 | 
##                          |    15.252 |     0.432 |     8.003 |           | 
##                          |     0.625 |     0.275 |     0.100 |     0.001 | 
##                          |     0.002 |     0.001 |     0.000 |           | 
##                          |     0.001 |     0.000 |     0.000 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                     Jazz |        69 |       216 |       330 |       615 | 
##                          |    67.866 |     0.474 |    43.941 |           | 
##                          |     0.112 |     0.351 |     0.537 |     0.015 | 
##                          |     0.006 |     0.016 |     0.022 |           | 
##                          |     0.002 |     0.005 |     0.008 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                Jazz: Out |        18 |        38 |        40 |        96 | 
##                          |     3.566 |     1.055 |     0.484 |           | 
##                          |     0.188 |     0.396 |     0.417 |     0.002 | 
##                          |     0.002 |     0.003 |     0.003 |           | 
##                          |     0.000 |     0.001 |     0.001 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##              Jazz: Vocal |         0 |         0 |        49 |        49 | 
##                          |    14.287 |    16.423 |    51.561 |           | 
##                          |     0.000 |     0.000 |     1.000 |     0.001 | 
##                          |     0.000 |     0.000 |     0.003 |           | 
##                          |     0.000 |     0.000 |     0.001 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##             Kid-Friendly |         0 |         8 |         7 |        15 | 
##                          |     4.374 |     1.758 |     0.350 |           | 
##                          |     0.000 |     0.533 |     0.467 |     0.000 | 
##                          |     0.000 |     0.001 |     0.000 |           | 
##                          |     0.000 |     0.000 |     0.000 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                Krautrock |        74 |        30 |        30 |       134 | 
##                          |    31.228 |     4.951 |     8.012 |           | 
##                          |     0.552 |     0.224 |     0.224 |     0.003 | 
##                          |     0.006 |     0.002 |     0.002 |           | 
##                          |     0.002 |     0.001 |     0.001 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                    Latin |         0 |         0 |        13 |        13 | 
##                          |     3.790 |     4.357 |    13.679 |           | 
##                          |     0.000 |     0.000 |     1.000 |     0.000 | 
##                          |     0.000 |     0.000 |     0.001 |           | 
##                          |     0.000 |     0.000 |     0.000 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##            Latin America |         3 |         7 |        69 |        79 | 
##                          |    17.425 |    14.328 |    52.940 |           | 
##                          |     0.038 |     0.089 |     0.873 |     0.002 | 
##                          |     0.000 |     0.001 |     0.005 |           | 
##                          |     0.000 |     0.000 |     0.002 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                    Lo-Fi |       432 |       279 |       238 |       949 | 
##                          |    87.164 |     4.797 |    38.142 |           | 
##                          |     0.455 |     0.294 |     0.251 |     0.023 | 
##                          |     0.036 |     0.020 |     0.016 |           | 
##                          |     0.011 |     0.007 |     0.006 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                Loud-Rock |       172 |       208 |       106 |       486 | 
##                          |     6.478 |    12.495 |    31.348 |           | 
##                          |     0.354 |     0.428 |     0.218 |     0.012 | 
##                          |     0.014 |     0.015 |     0.007 |           | 
##                          |     0.004 |     0.005 |     0.003 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                   Lounge |         1 |         6 |        46 |        53 | 
##                          |    13.518 |     7.790 |    34.741 |           | 
##                          |     0.019 |     0.113 |     0.868 |     0.001 | 
##                          |     0.000 |     0.000 |     0.003 |           | 
##                          |     0.000 |     0.000 |     0.001 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                    Metal |        24 |        59 |        72 |       155 | 
##                          |     9.939 |     0.957 |     3.457 |           | 
##                          |     0.155 |     0.381 |     0.465 |     0.004 | 
##                          |     0.002 |     0.004 |     0.005 |           | 
##                          |     0.001 |     0.001 |     0.002 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##              Middle East |         0 |         0 |        45 |        45 | 
##                          |    13.121 |    15.082 |    47.352 |           | 
##                          |     0.000 |     0.000 |     1.000 |     0.001 | 
##                          |     0.000 |     0.000 |     0.003 |           | 
##                          |     0.000 |     0.000 |     0.001 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##       Minimal Electronic |         5 |        75 |       133 |       213 | 
##                          |    52.507 |     0.183 |    35.990 |           | 
##                          |     0.023 |     0.352 |     0.624 |     0.005 | 
##                          |     0.000 |     0.005 |     0.009 |           | 
##                          |     0.000 |     0.002 |     0.003 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##               Minimalism |         0 |        15 |        12 |        27 | 
##                          |     7.872 |     3.913 |     0.366 |           | 
##                          |     0.000 |     0.556 |     0.444 |     0.001 | 
##                          |     0.000 |     0.001 |     0.001 |           | 
##                          |     0.000 |     0.000 |     0.000 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##              Modern Jazz |         2 |         9 |         0 |        11 | 
##                          |     0.454 |     7.658 |     4.106 |           | 
##                          |     0.182 |     0.818 |     0.000 |     0.000 | 
##                          |     0.000 |     0.001 |     0.000 |           | 
##                          |     0.000 |     0.000 |     0.000 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##          Musical Theater |         0 |         0 |         4 |         4 | 
##                          |     1.166 |     1.341 |     4.209 |           | 
##                          |     0.000 |     0.000 |     1.000 |     0.000 | 
##                          |     0.000 |     0.000 |     0.000 |           | 
##                          |     0.000 |     0.000 |     0.000 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##         Musique Concrete |        72 |        45 |        28 |       145 | 
##                          |    20.896 |     0.266 |    12.610 |           | 
##                          |     0.497 |     0.310 |     0.193 |     0.004 | 
##                          |     0.006 |     0.003 |     0.002 |           | 
##                          |     0.002 |     0.001 |     0.001 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                 Nerdcore |         0 |         4 |         6 |        10 | 
##                          |     2.916 |     0.125 |     1.377 |           | 
##                          |     0.000 |     0.400 |     0.600 |     0.000 | 
##                          |     0.000 |     0.000 |     0.000 |           | 
##                          |     0.000 |     0.000 |     0.000 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                 New Wave |         0 |        14 |        19 |        33 | 
##                          |     9.622 |     0.781 |     3.625 |           | 
##                          |     0.000 |     0.424 |     0.576 |     0.001 | 
##                          |     0.000 |     0.001 |     0.001 |           | 
##                          |     0.000 |     0.000 |     0.000 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                  No Wave |        67 |        42 |        31 |       140 | 
##                          |    16.791 |     0.516 |     8.648 |           | 
##                          |     0.479 |     0.300 |     0.221 |     0.003 | 
##                          |     0.006 |     0.003 |     0.002 |           | 
##                          |     0.002 |     0.001 |     0.001 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                    Noise |       407 |       308 |       288 |      1003 | 
##                          |    44.873 |     2.359 |    19.936 |           | 
##                          |     0.406 |     0.307 |     0.287 |     0.025 | 
##                          |     0.034 |     0.023 |     0.019 |           | 
##                          |     0.010 |     0.008 |     0.007 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##               Noise-Rock |       144 |        99 |        74 |       317 | 
##                          |    28.776 |     0.494 |    16.606 |           | 
##                          |     0.454 |     0.312 |     0.233 |     0.008 | 
##                          |     0.012 |     0.007 |     0.005 |           | 
##                          |     0.004 |     0.002 |     0.002 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##            North African |         0 |         0 |        12 |        12 | 
##                          |     3.499 |     4.022 |    12.627 |           | 
##                          |     0.000 |     0.000 |     1.000 |     0.000 | 
##                          |     0.000 |     0.000 |     0.001 |           | 
##                          |     0.000 |     0.000 |     0.000 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                  Novelty |         1 |        23 |        60 |        84 | 
##                          |    22.533 |     0.943 |    26.169 |           | 
##                          |     0.012 |     0.274 |     0.714 |     0.002 | 
##                          |     0.000 |     0.002 |     0.004 |           | 
##                          |     0.000 |     0.001 |     0.001 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                  Nu-Jazz |         0 |         0 |         1 |         1 | 
##                          |     0.292 |     0.335 |     1.052 |           | 
##                          |     0.000 |     0.000 |     1.000 |     0.000 | 
##                          |     0.000 |     0.000 |     0.000 |           | 
##                          |     0.000 |     0.000 |     0.000 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##      Old-Time / Historic |         0 |        87 |       334 |       421 | 
##                          |   122.751 |    20.743 |   199.024 |           | 
##                          |     0.000 |     0.207 |     0.793 |     0.010 | 
##                          |     0.000 |     0.006 |     0.022 |           | 
##                          |     0.000 |     0.002 |     0.008 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                    Opera |         0 |        16 |        37 |        53 | 
##                          |    15.453 |     0.175 |    14.982 |           | 
##                          |     0.000 |     0.302 |     0.698 |     0.001 | 
##                          |     0.000 |     0.001 |     0.002 |           | 
##                          |     0.000 |     0.000 |     0.001 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                  Pacific |         0 |         0 |         7 |         7 | 
##                          |     2.041 |     2.346 |     7.366 |           | 
##                          |     0.000 |     0.000 |     1.000 |     0.000 | 
##                          |     0.000 |     0.000 |     0.000 |           | 
##                          |     0.000 |     0.000 |     0.000 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                   Poetry |         1 |        12 |         5 |        18 | 
##                          |     3.439 |     5.902 |     0.440 |           | 
##                          |     0.056 |     0.667 |     0.278 |     0.000 | 
##                          |     0.000 |     0.001 |     0.000 |           | 
##                          |     0.000 |     0.000 |     0.000 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                    Polka |         0 |         0 |        21 |        21 | 
##                          |     6.123 |     7.038 |    22.098 |           | 
##                          |     0.000 |     0.000 |     1.000 |     0.001 | 
##                          |     0.000 |     0.000 |     0.001 |           | 
##                          |     0.000 |     0.000 |     0.001 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                      Pop |       420 |       821 |       657 |      1898 | 
##                          |    32.156 |    53.729 |     3.740 |           | 
##                          |     0.221 |     0.433 |     0.346 |     0.047 | 
##                          |     0.035 |     0.060 |     0.043 |           | 
##                          |     0.010 |     0.020 |     0.016 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                Post-Punk |       145 |       100 |        48 |       293 | 
##                          |    41.538 |     0.033 |    34.436 |           | 
##                          |     0.495 |     0.341 |     0.164 |     0.007 | 
##                          |     0.012 |     0.007 |     0.003 |           | 
##                          |     0.004 |     0.002 |     0.001 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                Post-Rock |        54 |       107 |        86 |       247 | 
##                          |     4.508 |     7.084 |     0.417 |           | 
##                          |     0.219 |     0.433 |     0.348 |     0.006 | 
##                          |     0.005 |     0.008 |     0.006 |           | 
##                          |     0.001 |     0.003 |     0.002 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                Power-Pop |        21 |        95 |        39 |       155 | 
##                          |    12.951 |    35.677 |     6.146 |           | 
##                          |     0.135 |     0.613 |     0.252 |     0.004 | 
##                          |     0.002 |     0.007 |     0.003 |           | 
##                          |     0.001 |     0.002 |     0.001 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##              Progressive |        12 |        45 |        36 |        93 | 
##                          |     8.426 |     6.137 |     0.048 |           | 
##                          |     0.129 |     0.484 |     0.387 |     0.002 | 
##                          |     0.001 |     0.003 |     0.002 |           | 
##                          |     0.000 |     0.001 |     0.001 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##               Psych-Folk |        70 |       106 |        66 |       242 | 
##                          |     0.004 |     7.640 |     6.554 |           | 
##                          |     0.289 |     0.438 |     0.273 |     0.006 | 
##                          |     0.006 |     0.008 |     0.004 |           | 
##                          |     0.002 |     0.003 |     0.002 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##               Psych-Rock |       118 |       156 |       121 |       395 | 
##                          |     0.070 |     4.212 |     4.743 |           | 
##                          |     0.299 |     0.395 |     0.306 |     0.010 | 
##                          |     0.010 |     0.011 |     0.008 |           | 
##                          |     0.003 |     0.004 |     0.003 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                     Punk |       737 |       576 |       289 |      1602 | 
##                          |   155.962 |     2.845 |   159.657 |           | 
##                          |     0.460 |     0.360 |     0.180 |     0.039 | 
##                          |     0.062 |     0.042 |     0.019 |           | 
##                          |     0.018 |     0.014 |     0.007 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                    Radio |       107 |        64 |        29 |       200 | 
##                          |    40.648 |     0.137 |    27.920 |           | 
##                          |     0.535 |     0.320 |     0.145 |     0.005 | 
##                          |     0.009 |     0.005 |     0.002 |           | 
##                          |     0.003 |     0.002 |     0.001 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                Radio Art |         0 |        14 |         6 |        20 | 
##                          |     5.831 |     7.943 |     0.288 |           | 
##                          |     0.000 |     0.700 |     0.300 |     0.000 | 
##                          |     0.000 |     0.001 |     0.000 |           | 
##                          |     0.000 |     0.000 |     0.000 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##            Radio Theater |         0 |         3 |         5 |         8 | 
##                          |     2.333 |     0.038 |     1.358 |           | 
##                          |     0.000 |     0.375 |     0.625 |     0.000 | 
##                          |     0.000 |     0.000 |     0.000 |           | 
##                          |     0.000 |     0.000 |     0.000 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                      Rap |         0 |         4 |         9 |        13 | 
##                          |     3.790 |     0.029 |     3.545 |           | 
##                          |     0.000 |     0.308 |     0.692 |     0.000 | 
##                          |     0.000 |     0.000 |     0.001 |           | 
##                          |     0.000 |     0.000 |     0.000 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##       Reggae - Dancehall |         0 |         1 |         7 |         8 | 
##                          |     2.333 |     1.054 |     5.395 |           | 
##                          |     0.000 |     0.125 |     0.875 |     0.000 | 
##                          |     0.000 |     0.000 |     0.000 |           | 
##                          |     0.000 |     0.000 |     0.000 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##             Reggae - Dub |         1 |        19 |        51 |        71 | 
##                          |    18.750 |     0.967 |    22.644 |           | 
##                          |     0.014 |     0.268 |     0.718 |     0.002 | 
##                          |     0.000 |     0.001 |     0.003 |           | 
##                          |     0.000 |     0.000 |     0.001 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                     Rock |      2209 |      1997 |      1469 |      5675 | 
##                          |   185.715 |     4.744 |   199.041 |           | 
##                          |     0.389 |     0.352 |     0.259 |     0.139 | 
##                          |     0.186 |     0.146 |     0.096 |           | 
##                          |     0.054 |     0.049 |     0.036 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##               Rock Opera |         0 |         2 |        17 |        19 | 
##                          |     5.540 |     2.996 |    13.841 |           | 
##                          |     0.000 |     0.105 |     0.895 |     0.000 | 
##                          |     0.000 |     0.000 |     0.001 |           | 
##                          |     0.000 |     0.000 |     0.000 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##               Rockabilly |         0 |         2 |        12 |        14 | 
##                          |     4.082 |     1.545 |     8.781 |           | 
##                          |     0.000 |     0.143 |     0.857 |     0.000 | 
##                          |     0.000 |     0.000 |     0.001 |           | 
##                          |     0.000 |     0.000 |     0.000 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                 Shoegaze |         0 |        11 |        25 |        36 | 
##                          |    10.497 |     0.094 |     9.948 |           | 
##                          |     0.000 |     0.306 |     0.694 |     0.001 | 
##                          |     0.000 |     0.001 |     0.002 |           | 
##                          |     0.000 |     0.000 |     0.001 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##        Singer-Songwriter |        89 |       186 |       249 |       524 | 
##                          |    26.627 |     0.613 |    14.581 |           | 
##                          |     0.170 |     0.355 |     0.475 |     0.013 | 
##                          |     0.007 |     0.014 |     0.016 |           | 
##                          |     0.002 |     0.005 |     0.006 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                   Skweee |         0 |         0 |         6 |         6 | 
##                          |     1.749 |     2.011 |     6.314 |           | 
##                          |     0.000 |     0.000 |     1.000 |     0.000 | 
##                          |     0.000 |     0.000 |     0.000 |           | 
##                          |     0.000 |     0.000 |     0.000 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                   Sludge |        12 |        15 |        12 |        39 | 
##                          |     0.035 |     0.285 |     0.449 |           | 
##                          |     0.308 |     0.385 |     0.308 |     0.001 | 
##                          |     0.001 |     0.001 |     0.001 |           | 
##                          |     0.000 |     0.000 |     0.000 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                 Soul-RnB |         0 |        40 |       136 |       176 | 
##                          |    51.316 |     6.112 |    75.234 |           | 
##                          |     0.000 |     0.227 |     0.773 |     0.004 | 
##                          |     0.000 |     0.003 |     0.009 |           | 
##                          |     0.000 |     0.001 |     0.003 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                Sound Art |         0 |         0 |         4 |         4 | 
##                          |     1.166 |     1.341 |     4.209 |           | 
##                          |     0.000 |     0.000 |     1.000 |     0.000 | 
##                          |     0.000 |     0.000 |     0.000 |           | 
##                          |     0.000 |     0.000 |     0.000 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##            Sound Collage |        66 |        73 |        66 |       205 | 
##                          |     0.649 |     0.268 |     1.447 |           | 
##                          |     0.322 |     0.356 |     0.322 |     0.005 | 
##                          |     0.006 |     0.005 |     0.004 |           | 
##                          |     0.002 |     0.002 |     0.002 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##            Sound Effects |         1 |         5 |        27 |        33 | 
##                          |     7.726 |     3.321 |    17.499 |           | 
##                          |     0.030 |     0.152 |     0.818 |     0.001 | 
##                          |     0.000 |     0.000 |     0.002 |           | 
##                          |     0.000 |     0.000 |     0.001 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##             Sound Poetry |        72 |        19 |        20 |       111 | 
##                          |    48.541 |     8.906 |    11.088 |           | 
##                          |     0.649 |     0.171 |     0.180 |     0.003 | 
##                          |     0.006 |     0.001 |     0.001 |           | 
##                          |     0.002 |     0.000 |     0.000 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##               Soundtrack |        36 |        35 |       173 |       244 | 
##                          |    17.360 |    26.758 |    73.684 |           | 
##                          |     0.148 |     0.143 |     0.709 |     0.006 | 
##                          |     0.003 |     0.003 |     0.011 |           | 
##                          |     0.001 |     0.001 |     0.004 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
## South Indian Traditional |         0 |         0 |         3 |         3 | 
##                          |     0.875 |     1.005 |     3.157 |           | 
##                          |     0.000 |     0.000 |     1.000 |     0.000 | 
##                          |     0.000 |     0.000 |     0.000 |           | 
##                          |     0.000 |     0.000 |     0.000 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##               Space-Rock |        34 |        54 |        37 |       125 | 
##                          |     0.164 |     3.498 |     2.000 |           | 
##                          |     0.272 |     0.432 |     0.296 |     0.003 | 
##                          |     0.003 |     0.004 |     0.002 |           | 
##                          |     0.001 |     0.001 |     0.001 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                  Spanish |         0 |         2 |        31 |        33 | 
##                          |     9.622 |     7.422 |    28.334 |           | 
##                          |     0.000 |     0.061 |     0.939 |     0.001 | 
##                          |     0.000 |     0.000 |     0.002 |           | 
##                          |     0.000 |     0.000 |     0.001 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                   Spoken |       210 |       114 |       114 |       438 | 
##                          |    53.028 |     7.328 |    14.983 |           | 
##                          |     0.479 |     0.260 |     0.260 |     0.011 | 
##                          |     0.018 |     0.008 |     0.007 |           | 
##                          |     0.005 |     0.003 |     0.003 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##             Spoken Weird |        91 |        17 |        21 |       129 | 
##                          |    75.779 |    15.919 |    15.311 |           | 
##                          |     0.705 |     0.132 |     0.163 |     0.003 | 
##                          |     0.008 |     0.001 |     0.001 |           | 
##                          |     0.002 |     0.000 |     0.001 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##              Spoken Word |         8 |         2 |         0 |        10 | 
##                          |     8.866 |     0.545 |     3.733 |           | 
##                          |     0.800 |     0.200 |     0.000 |     0.000 | 
##                          |     0.001 |     0.000 |     0.000 |           | 
##                          |     0.000 |     0.000 |     0.000 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                     Surf |         0 |         0 |        36 |        36 | 
##                          |    10.497 |    12.066 |    37.882 |           | 
##                          |     0.000 |     0.000 |     1.000 |     0.001 | 
##                          |     0.000 |     0.000 |     0.002 |           | 
##                          |     0.000 |     0.000 |     0.001 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                Synth Pop |        45 |       122 |        61 |       228 | 
##                          |     6.939 |    27.193 |     6.828 |           | 
##                          |     0.197 |     0.535 |     0.268 |     0.006 | 
##                          |     0.004 |     0.009 |     0.004 |           | 
##                          |     0.001 |     0.003 |     0.001 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##               Talk Radio |         0 |         0 |         1 |         1 | 
##                          |     0.292 |     0.335 |     1.052 |           | 
##                          |     0.000 |     0.000 |     1.000 |     0.000 | 
##                          |     0.000 |     0.000 |     0.000 |           | 
##                          |     0.000 |     0.000 |     0.000 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                   Techno |        15 |       122 |       120 |       257 | 
##                          |    47.936 |    14.934 |     6.039 |           | 
##                          |     0.058 |     0.475 |     0.467 |     0.006 | 
##                          |     0.001 |     0.009 |     0.008 |           | 
##                          |     0.000 |     0.003 |     0.003 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                   Thrash |         0 |         3 |         2 |         5 | 
##                          |     1.458 |     1.046 |     0.010 |           | 
##                          |     0.000 |     0.600 |     0.400 |     0.000 | 
##                          |     0.000 |     0.000 |     0.000 |           | 
##                          |     0.000 |     0.000 |     0.000 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##                 Trip-Hop |         0 |        12 |        29 |        41 | 
##                          |    11.954 |     0.221 |    12.256 |           | 
##                          |     0.000 |     0.293 |     0.707 |     0.001 | 
##                          |     0.000 |     0.001 |     0.002 |           | 
##                          |     0.000 |     0.000 |     0.001 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##           Unclassifiable |       130 |        72 |        63 |       265 | 
##                          |    35.991 |     3.184 |    13.042 |           | 
##                          |     0.491 |     0.272 |     0.238 |     0.006 | 
##                          |     0.011 |     0.005 |     0.004 |           | 
##                          |     0.003 |     0.002 |     0.002 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
##             Column Total |     11894 |     13672 |     15227 |     40793 | 
##                          |     0.292 |     0.335 |     0.373 |           | 
## -------------------------|-----------|-----------|-----------|-----------|
## 
## 
CrossTable(tracks_disc$language, tracks_disc$listens)
## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## | Chi-square contribution |
## |           N / Row Total |
## |           N / Col Total |
## |         N / Table Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  40793 
## 
##  
##                      | tracks_disc$listens 
## tracks_disc$language |       low |    medium |      high | Row Total | 
## ---------------------|-----------|-----------|-----------|-----------|
##                   ar |         0 |         0 |        34 |        34 | 
##                      |     9.913 |    11.395 |    35.777 |           | 
##                      |     0.000 |     0.000 |     1.000 |     0.001 | 
##                      |     0.000 |     0.000 |     0.002 |           | 
##                      |     0.000 |     0.000 |     0.001 |           | 
## ---------------------|-----------|-----------|-----------|-----------|
##                   az |         0 |         0 |         4 |         4 | 
##                      |     1.166 |     1.341 |     4.209 |           | 
##                      |     0.000 |     0.000 |     1.000 |     0.000 | 
##                      |     0.000 |     0.000 |     0.000 |           | 
##                      |     0.000 |     0.000 |     0.000 |           | 
## ---------------------|-----------|-----------|-----------|-----------|
##                   bg |         0 |         6 |         8 |        14 | 
##                      |     4.082 |     0.365 |     1.473 |           | 
##                      |     0.000 |     0.429 |     0.571 |     0.000 | 
##                      |     0.000 |     0.000 |     0.001 |           | 
##                      |     0.000 |     0.000 |     0.000 |           | 
## ---------------------|-----------|-----------|-----------|-----------|
##                   bm |         0 |         0 |         3 |         3 | 
##                      |     0.875 |     1.005 |     3.157 |           | 
##                      |     0.000 |     0.000 |     1.000 |     0.000 | 
##                      |     0.000 |     0.000 |     0.000 |           | 
##                      |     0.000 |     0.000 |     0.000 |           | 
## ---------------------|-----------|-----------|-----------|-----------|
##                   cs |         4 |         4 |         8 |        16 | 
##                      |     0.095 |     0.346 |     0.688 |           | 
##                      |     0.250 |     0.250 |     0.500 |     0.000 | 
##                      |     0.000 |     0.000 |     0.001 |           | 
##                      |     0.000 |     0.000 |     0.000 |           | 
## ---------------------|-----------|-----------|-----------|-----------|
##                   de |         2 |        57 |       135 |       194 | 
##                      |    52.635 |     0.989 |    54.089 |           | 
##                      |     0.010 |     0.294 |     0.696 |     0.005 | 
##                      |     0.000 |     0.004 |     0.009 |           | 
##                      |     0.000 |     0.001 |     0.003 |           | 
## ---------------------|-----------|-----------|-----------|-----------|
##                   ee |         0 |         0 |        28 |        28 | 
##                      |     8.164 |     9.384 |    29.463 |           | 
##                      |     0.000 |     0.000 |     1.000 |     0.001 | 
##                      |     0.000 |     0.000 |     0.002 |           | 
##                      |     0.000 |     0.000 |     0.001 |           | 
## ---------------------|-----------|-----------|-----------|-----------|
##                   el |         0 |         8 |         7 |        15 | 
##                      |     4.374 |     1.758 |     0.350 |           | 
##                      |     0.000 |     0.533 |     0.467 |     0.000 | 
##                      |     0.000 |     0.001 |     0.000 |           | 
##                      |     0.000 |     0.000 |     0.000 |           | 
## ---------------------|-----------|-----------|-----------|-----------|
##                   en |     11619 |     13246 |     13424 |     38289 | 
##                      |    18.551 |    13.306 |    52.754 |           | 
##                      |     0.303 |     0.346 |     0.351 |     0.939 | 
##                      |     0.977 |     0.969 |     0.882 |           | 
##                      |     0.285 |     0.325 |     0.329 |           | 
## ---------------------|-----------|-----------|-----------|-----------|
##                   es |       109 |        89 |       403 |       601 | 
##                      |    25.034 |    62.753 |   142.285 |           | 
##                      |     0.181 |     0.148 |     0.671 |     0.015 | 
##                      |     0.009 |     0.007 |     0.026 |           | 
##                      |     0.003 |     0.002 |     0.010 |           | 
## ---------------------|-----------|-----------|-----------|-----------|
##                   eu |         0 |         0 |         3 |         3 | 
##                      |     0.875 |     1.005 |     3.157 |           | 
##                      |     0.000 |     0.000 |     1.000 |     0.000 | 
##                      |     0.000 |     0.000 |     0.000 |           | 
##                      |     0.000 |     0.000 |     0.000 |           | 
## ---------------------|-----------|-----------|-----------|-----------|
##                   fi |         0 |         9 |        11 |        20 | 
##                      |     5.831 |     0.787 |     1.673 |           | 
##                      |     0.000 |     0.450 |     0.550 |     0.000 | 
##                      |     0.000 |     0.001 |     0.001 |           | 
##                      |     0.000 |     0.000 |     0.000 |           | 
## ---------------------|-----------|-----------|-----------|-----------|
##                   fr |       125 |        99 |       398 |       622 | 
##                      |    17.513 |    57.481 |   118.432 |           | 
##                      |     0.201 |     0.159 |     0.640 |     0.015 | 
##                      |     0.011 |     0.007 |     0.026 |           | 
##                      |     0.003 |     0.002 |     0.010 |           | 
## ---------------------|-----------|-----------|-----------|-----------|
##                   gu |         0 |         0 |         3 |         3 | 
##                      |     0.875 |     1.005 |     3.157 |           | 
##                      |     0.000 |     0.000 |     1.000 |     0.000 | 
##                      |     0.000 |     0.000 |     0.000 |           | 
##                      |     0.000 |     0.000 |     0.000 |           | 
## ---------------------|-----------|-----------|-----------|-----------|
##                   ha |         0 |         0 |         3 |         3 | 
##                      |     0.875 |     1.005 |     3.157 |           | 
##                      |     0.000 |     0.000 |     1.000 |     0.000 | 
##                      |     0.000 |     0.000 |     0.000 |           | 
##                      |     0.000 |     0.000 |     0.000 |           | 
## ---------------------|-----------|-----------|-----------|-----------|
##                   he |         0 |        50 |        33 |        83 | 
##                      |    24.200 |    17.688 |     0.131 |           | 
##                      |     0.000 |     0.602 |     0.398 |     0.002 | 
##                      |     0.000 |     0.004 |     0.002 |           | 
##                      |     0.000 |     0.001 |     0.001 |           | 
## ---------------------|-----------|-----------|-----------|-----------|
##                   hi |         0 |         0 |         9 |         9 | 
##                      |     2.624 |     3.016 |     9.470 |           | 
##                      |     0.000 |     0.000 |     1.000 |     0.000 | 
##                      |     0.000 |     0.000 |     0.001 |           | 
##                      |     0.000 |     0.000 |     0.000 |           | 
## ---------------------|-----------|-----------|-----------|-----------|
##                   hy |         0 |         0 |         4 |         4 | 
##                      |     1.166 |     1.341 |     4.209 |           | 
##                      |     0.000 |     0.000 |     1.000 |     0.000 | 
##                      |     0.000 |     0.000 |     0.000 |           | 
##                      |     0.000 |     0.000 |     0.000 |           | 
## ---------------------|-----------|-----------|-----------|-----------|
##                   id |         0 |         0 |        10 |        10 | 
##                      |     2.916 |     3.352 |    10.523 |           | 
##                      |     0.000 |     0.000 |     1.000 |     0.000 | 
##                      |     0.000 |     0.000 |     0.001 |           | 
##                      |     0.000 |     0.000 |     0.000 |           | 
## ---------------------|-----------|-----------|-----------|-----------|
##                   it |         6 |         1 |        38 |        45 | 
##                      |     3.864 |    13.148 |    26.763 |           | 
##                      |     0.133 |     0.022 |     0.844 |     0.001 | 
##                      |     0.001 |     0.000 |     0.002 |           | 
##                      |     0.000 |     0.000 |     0.001 |           | 
## ---------------------|-----------|-----------|-----------|-----------|
##                   ja |         1 |         6 |         8 |        15 | 
##                      |     2.602 |     0.188 |     1.029 |           | 
##                      |     0.067 |     0.400 |     0.533 |     0.000 | 
##                      |     0.000 |     0.000 |     0.001 |           | 
##                      |     0.000 |     0.000 |     0.000 |           | 
## ---------------------|-----------|-----------|-----------|-----------|
##                   ka |         0 |         0 |         2 |         2 | 
##                      |     0.583 |     0.670 |     2.105 |           | 
##                      |     0.000 |     0.000 |     1.000 |     0.000 | 
##                      |     0.000 |     0.000 |     0.000 |           | 
##                      |     0.000 |     0.000 |     0.000 |           | 
## ---------------------|-----------|-----------|-----------|-----------|
##                   ko |         3 |         0 |         0 |         3 | 
##                      |     5.164 |     1.005 |     1.120 |           | 
##                      |     1.000 |     0.000 |     0.000 |     0.000 | 
##                      |     0.000 |     0.000 |     0.000 |           | 
##                      |     0.000 |     0.000 |     0.000 |           | 
## ---------------------|-----------|-----------|-----------|-----------|
##                   la |         0 |         0 |         8 |         8 | 
##                      |     2.333 |     2.681 |     8.418 |           | 
##                      |     0.000 |     0.000 |     1.000 |     0.000 | 
##                      |     0.000 |     0.000 |     0.001 |           | 
##                      |     0.000 |     0.000 |     0.000 |           | 
## ---------------------|-----------|-----------|-----------|-----------|
##                   lt |         0 |         0 |         3 |         3 | 
##                      |     0.875 |     1.005 |     3.157 |           | 
##                      |     0.000 |     0.000 |     1.000 |     0.000 | 
##                      |     0.000 |     0.000 |     0.000 |           | 
##                      |     0.000 |     0.000 |     0.000 |           | 
## ---------------------|-----------|-----------|-----------|-----------|
##                   ms |         0 |         0 |         6 |         6 | 
##                      |     1.749 |     2.011 |     6.314 |           | 
##                      |     0.000 |     0.000 |     1.000 |     0.000 | 
##                      |     0.000 |     0.000 |     0.000 |           | 
##                      |     0.000 |     0.000 |     0.000 |           | 
## ---------------------|-----------|-----------|-----------|-----------|
##                   my |         0 |         0 |         3 |         3 | 
##                      |     0.875 |     1.005 |     3.157 |           | 
##                      |     0.000 |     0.000 |     1.000 |     0.000 | 
##                      |     0.000 |     0.000 |     0.000 |           | 
##                      |     0.000 |     0.000 |     0.000 |           | 
## ---------------------|-----------|-----------|-----------|-----------|
##                   nl |         8 |         0 |         5 |        13 | 
##                      |     4.675 |     4.357 |     0.004 |           | 
##                      |     0.615 |     0.000 |     0.385 |     0.000 | 
##                      |     0.001 |     0.000 |     0.000 |           | 
##                      |     0.000 |     0.000 |     0.000 |           | 
## ---------------------|-----------|-----------|-----------|-----------|
##                   no |         0 |         0 |         2 |         2 | 
##                      |     0.583 |     0.670 |     2.105 |           | 
##                      |     0.000 |     0.000 |     1.000 |     0.000 | 
##                      |     0.000 |     0.000 |     0.000 |           | 
##                      |     0.000 |     0.000 |     0.000 |           | 
## ---------------------|-----------|-----------|-----------|-----------|
##                   pl |         0 |         7 |        67 |        74 | 
##                      |    21.576 |    12.777 |    56.136 |           | 
##                      |     0.000 |     0.095 |     0.905 |     0.002 | 
##                      |     0.000 |     0.001 |     0.004 |           | 
##                      |     0.000 |     0.000 |     0.002 |           | 
## ---------------------|-----------|-----------|-----------|-----------|
##                   pt |        10 |        45 |       294 |       349 | 
##                      |    82.741 |    44.282 |   205.772 |           | 
##                      |     0.029 |     0.129 |     0.842 |     0.009 | 
##                      |     0.001 |     0.003 |     0.019 |           | 
##                      |     0.000 |     0.001 |     0.007 |           | 
## ---------------------|-----------|-----------|-----------|-----------|
##                   ru |         0 |        17 |       108 |       125 | 
##                      |    36.446 |    14.793 |    80.641 |           | 
##                      |     0.000 |     0.136 |     0.864 |     0.003 | 
##                      |     0.000 |     0.001 |     0.007 |           | 
##                      |     0.000 |     0.000 |     0.003 |           | 
## ---------------------|-----------|-----------|-----------|-----------|
##                   sk |         0 |         0 |         3 |         3 | 
##                      |     0.875 |     1.005 |     3.157 |           | 
##                      |     0.000 |     0.000 |     1.000 |     0.000 | 
##                      |     0.000 |     0.000 |     0.000 |           | 
##                      |     0.000 |     0.000 |     0.000 |           | 
## ---------------------|-----------|-----------|-----------|-----------|
##                   sr |         7 |        22 |        31 |        60 | 
##                      |     6.295 |     0.178 |     3.305 |           | 
##                      |     0.117 |     0.367 |     0.517 |     0.001 | 
##                      |     0.001 |     0.002 |     0.002 |           | 
##                      |     0.000 |     0.001 |     0.001 |           | 
## ---------------------|-----------|-----------|-----------|-----------|
##                   sw |         0 |         0 |        13 |        13 | 
##                      |     3.790 |     4.357 |    13.679 |           | 
##                      |     0.000 |     0.000 |     1.000 |     0.000 | 
##                      |     0.000 |     0.000 |     0.001 |           | 
##                      |     0.000 |     0.000 |     0.000 |           | 
## ---------------------|-----------|-----------|-----------|-----------|
##                   th |         0 |         0 |         3 |         3 | 
##                      |     0.875 |     1.005 |     3.157 |           | 
##                      |     0.000 |     0.000 |     1.000 |     0.000 | 
##                      |     0.000 |     0.000 |     0.000 |           | 
##                      |     0.000 |     0.000 |     0.000 |           | 
## ---------------------|-----------|-----------|-----------|-----------|
##                   tl |         0 |         0 |         2 |         2 | 
##                      |     0.583 |     0.670 |     2.105 |           | 
##                      |     0.000 |     0.000 |     1.000 |     0.000 | 
##                      |     0.000 |     0.000 |     0.000 |           | 
##                      |     0.000 |     0.000 |     0.000 |           | 
## ---------------------|-----------|-----------|-----------|-----------|
##                   tr |         0 |         4 |        82 |        86 | 
##                      |    25.075 |    21.378 |    77.561 |           | 
##                      |     0.000 |     0.047 |     0.953 |     0.002 | 
##                      |     0.000 |     0.000 |     0.005 |           | 
##                      |     0.000 |     0.000 |     0.002 |           | 
## ---------------------|-----------|-----------|-----------|-----------|
##                   tw |         0 |         0 |         3 |         3 | 
##                      |     0.875 |     1.005 |     3.157 |           | 
##                      |     0.000 |     0.000 |     1.000 |     0.000 | 
##                      |     0.000 |     0.000 |     0.000 |           | 
##                      |     0.000 |     0.000 |     0.000 |           | 
## ---------------------|-----------|-----------|-----------|-----------|
##                   ty |         0 |         0 |         2 |         2 | 
##                      |     0.583 |     0.670 |     2.105 |           | 
##                      |     0.000 |     0.000 |     1.000 |     0.000 | 
##                      |     0.000 |     0.000 |     0.000 |           | 
##                      |     0.000 |     0.000 |     0.000 |           | 
## ---------------------|-----------|-----------|-----------|-----------|
##                   uk |         0 |         0 |         3 |         3 | 
##                      |     0.875 |     1.005 |     3.157 |           | 
##                      |     0.000 |     0.000 |     1.000 |     0.000 | 
##                      |     0.000 |     0.000 |     0.000 |           | 
##                      |     0.000 |     0.000 |     0.000 |           | 
## ---------------------|-----------|-----------|-----------|-----------|
##                   uz |         0 |         0 |         2 |         2 | 
##                      |     0.583 |     0.670 |     2.105 |           | 
##                      |     0.000 |     0.000 |     1.000 |     0.000 | 
##                      |     0.000 |     0.000 |     0.000 |           | 
##                      |     0.000 |     0.000 |     0.000 |           | 
## ---------------------|-----------|-----------|-----------|-----------|
##                   vi |         0 |         0 |         6 |         6 | 
##                      |     1.749 |     2.011 |     6.314 |           | 
##                      |     0.000 |     0.000 |     1.000 |     0.000 | 
##                      |     0.000 |     0.000 |     0.000 |           | 
##                      |     0.000 |     0.000 |     0.000 |           | 
## ---------------------|-----------|-----------|-----------|-----------|
##                   zh |         0 |         2 |         5 |         7 | 
##                      |     2.041 |     0.051 |     2.181 |           | 
##                      |     0.000 |     0.286 |     0.714 |     0.000 | 
##                      |     0.000 |     0.000 |     0.000 |           | 
##                      |     0.000 |     0.000 |     0.000 |           | 
## ---------------------|-----------|-----------|-----------|-----------|
##         Column Total |     11894 |     13672 |     15227 |     40793 | 
##                      |     0.292 |     0.335 |     0.373 |           | 
## ---------------------|-----------|-----------|-----------|-----------|
## 
## 

Genre-Listens Aggregation

aggregate(listens ~ genre, data = tracks_disc, FUN = length)
##                        genre listens
## 1     20th Century Classical      60
## 2                    African      57
## 3                   Afrobeat       5
## 4        Alternative Hip-Hop     120
## 5                    Ambient     286
## 6         Ambient Electronic     377
## 7                  Americana     151
## 8              Asia-Far East      29
## 9              Audio Collage     287
## 10               Avant-Garde    1136
## 11                    Balkan      83
## 12                    Banter       4
## 13            Big Band/Swing      19
## 14                   Bigbeat      11
## 15               Black-Metal      20
## 16                 Bluegrass      87
## 17                     Blues     162
## 18                 Brazilian      75
## 19                 Breakbeat       7
## 20          Breakcore - Hard      77
## 21              British Folk      18
## 22                    Celtic      15
## 23                 Chill-out      11
## 24                Chip Music     267
## 25                  Chiptune     100
## 26              Choral Music      46
## 27                 Christmas       4
## 28                 Classical     364
## 29                    Comedy      55
## 30               Compilation      85
## 31            Composed Music      79
## 32    Contemporary Classical       4
## 33                   Country     284
## 34                    Cumbia       1
## 35                     Dance     246
## 36               Death-Metal       5
## 37                 Deep Funk       1
## 38                     Disco      98
## 39                 Downtempo       2
## 40                     Drone     167
## 41               Drum & Bass       3
## 42                   Dubstep      71
## 43            Easy Listening      59
## 44     Easy Listening: Vocal       4
## 45              Electro-Punk     142
## 46           Electroacoustic     316
## 47                Electronic    3385
## 48                    Europe     113
## 49              Experimental    4330
## 50          Experimental Pop    1074
## 51                      Fado       1
## 52          Field Recordings     271
## 53                  Flamenco       1
## 54                      Folk    1983
## 55                Freak-Folk      52
## 56                 Free-Folk      92
## 57                 Free-Jazz     250
## 58                    French      11
## 59                      Funk      44
## 60                    Garage     476
## 61                    Glitch     108
## 62                      Goth      22
## 63                 Grindcore      10
## 64                  Hardcore     162
## 65                   Hip-Hop     889
## 66             Hip-Hop Beats       3
## 67                   Holiday      33
## 68                     House      77
## 69                       IDM      33
## 70                    Improv     465
## 71                    Indian      17
## 72                Indie-Rock     884
## 73                Industrial     113
## 74              Instrumental     548
## 75             International     695
## 76                 Interview      40
## 77                      Jazz     615
## 78                 Jazz: Out      96
## 79               Jazz: Vocal      49
## 80              Kid-Friendly      15
## 81                 Krautrock     134
## 82                     Latin      13
## 83             Latin America      79
## 84                     Lo-Fi     949
## 85                 Loud-Rock     486
## 86                    Lounge      53
## 87                     Metal     155
## 88               Middle East      45
## 89        Minimal Electronic     213
## 90                Minimalism      27
## 91               Modern Jazz      11
## 92           Musical Theater       4
## 93          Musique Concrete     145
## 94                  Nerdcore      10
## 95                  New Wave      33
## 96                   No Wave     140
## 97                     Noise    1003
## 98                Noise-Rock     317
## 99             North African      12
## 100                  Novelty      84
## 101                  Nu-Jazz       1
## 102      Old-Time / Historic     421
## 103                    Opera      53
## 104                  Pacific       7
## 105                   Poetry      18
## 106                    Polka      21
## 107                      Pop    1898
## 108                Post-Punk     293
## 109                Post-Rock     247
## 110                Power-Pop     155
## 111              Progressive      93
## 112               Psych-Folk     242
## 113               Psych-Rock     395
## 114                     Punk    1602
## 115                    Radio     200
## 116                Radio Art      20
## 117            Radio Theater       8
## 118                      Rap      13
## 119       Reggae - Dancehall       8
## 120             Reggae - Dub      71
## 121                     Rock    5675
## 122               Rock Opera      19
## 123               Rockabilly      14
## 124                 Shoegaze      36
## 125        Singer-Songwriter     524
## 126                   Skweee       6
## 127                   Sludge      39
## 128                 Soul-RnB     176
## 129                Sound Art       4
## 130            Sound Collage     205
## 131            Sound Effects      33
## 132             Sound Poetry     111
## 133               Soundtrack     244
## 134 South Indian Traditional       3
## 135               Space-Rock     125
## 136                  Spanish      33
## 137                   Spoken     438
## 138             Spoken Weird     129
## 139              Spoken Word      10
## 140                     Surf      36
## 141                Synth Pop     228
## 142               Talk Radio       1
## 143                   Techno     257
## 144                   Thrash       5
## 145                 Trip-Hop      41
## 146           Unclassifiable     265

Different genres have vastly different representation in the dataset, with some genres appearing thousands of times while others appear only dozens of times.

Association Rules Mining

Now before starting the algorithms, we need to check what we have built.

summary(tracks_basket)
## transactions as itemMatrix in sparse format with
##  40793 rows (elements/itemsets/transactions) and
##  193 columns (items) and a density of 0.01554404 
## 
## most frequent items:
##    language=en   listens=high listens=medium    listens=low     genre=Rock 
##          38289          15227          13672          11894           5675 
##        (Other) 
##          37622 
## 
## element (itemset/transaction) length distribution:
## sizes
##     3 
## 40793 
## 
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##       3       3       3       3       3       3 
## 
## includes extended item information - examples:
##        labels variables levels
## 1 language=ar  language     ar
## 2 language=az  language     az
## 3 language=bg  language     bg
## 
## includes extended transaction information - examples:
##   transactionID
## 1             1
## 2             2
## 3             3

The dataset consists of 40,793 transactions with 193 items and a low density (1.5%), which is typical for market basket data. The most frequent items correspond to language (english language domination) and listening-level categories (equally splitted in three earlier), confirming the consistency of the constructed transactions.

Approach 1: Initial Exploration

Initial parameters with large support and confidence to get a manageable number of rules.

rules_1 <- apriori(
  tracks_basket,
  parameter = list(
    support = 0.01,
    confidence = 0.5
  )
)
## Apriori
## 
## Parameter specification:
##  confidence minval smax arem  aval originalSupport maxtime support minlen
##         0.5    0.1    1 none FALSE            TRUE       5    0.01      1
##  maxlen target  ext
##      10  rules TRUE
## 
## Algorithmic control:
##  filter tree heap memopt load sort verbose
##     0.1 TRUE TRUE  FALSE TRUE    2    TRUE
## 
## Absolute minimum support count: 407 
## 
## set item appearances ...[0 item(s)] done [0.00s].
## set transactions ...[193 item(s), 40793 transaction(s)] done [0.00s].
## sorting and recoding items ... [27 item(s)] done [0.00s].
## creating transaction tree ... done [0.00s].
## checking subsets of size 1 2 3 done [0.00s].
## writing ... [43 rule(s)] done [0.00s].
## creating S4 object  ... done [0.00s].
rules_1 <- rules_1[!is.redundant(rules_1)]
rules_1_by_lift <- sort(rules_1, by = "lift", decreasing = TRUE)
inspect(head(rules_1_by_lift, n = 10))
##      lhs                         rhs               support confidence   coverage     lift count
## [1]  {genre=International}    => {listens=high} 0.01409556  0.8273381 0.01703724 2.216432   575
## [2]  {genre=Improv}           => {language=en}  0.01139901  1.0000000 0.01139901 1.065397   465
## [3]  {listens=low,                                                                             
##       genre=Folk}             => {language=en}  0.01088422  1.0000000 0.01088422 1.065397   444
## [4]  {listens=low,                                                                             
##       genre=Avant-Garde}      => {language=en}  0.01262472  0.9980620 0.01264923 1.063333   515
## [5]  {listens=low,                                                                             
##       genre=Experimental}     => {language=en}  0.04471355  0.9923830 0.04505675 1.057282  1824
## [6]  {genre=Spoken}           => {language=en}  0.01063908  0.9908676 0.01073714 1.055668   434
## [7]  {listens=medium,                                                                          
##       genre=Electronic}       => {language=en}  0.03135342  0.9861218 0.03179467 1.050612  1279
## [8]  {genre=Loud-Rock}        => {language=en}  0.01174221  0.9855967 0.01191381 1.050052   479
## [9]  {listens=low,                                                                             
##       genre=Electronic}       => {language=en}  0.01958669  0.9852035 0.01988086 1.049633   799
## [10] {listens=medium,                                                                          
##       genre=Experimental Pop} => {language=en}  0.01115387  0.9827214 0.01134999 1.046989   455
plot(
  head(rules_1, n = 20),
  method = "graph",
  main = "Association Rules Network (Approach 1)"
)
## Available control parameters (with default values):
## layout    =  stress
## circular  =  FALSE
## ggraphdots    =  NULL
## edges     =  <environment>
## nodes     =  <environment>
## nodetext  =  <environment>
## colors    =  c("#EE0000FF", "#EEEEEEFF")
## engine    =  ggplot2
## max   =  100
## verbose   =  FALSE

Using relatively loose thresholds for support and confidence allows us to generate an initial set of association rules and explore the global structure of the data. The strongest rules mostly involve associations between genre or listening-level categories and the English language as the main item in the center. These rules typically show high confidence but relatively low lift values, suggesting that while the associations are frequent, they are partly explained by the dominance of English-language tracks in the dataset. The network visualization highlights the central role of the English language item, which acts as a hub connected to many genres and popularity levels

Approach 2: Stricter Parameters

Second try with more strict parameters to focus on stronger associations.

rules_2 <- apriori(
  tracks_basket,
  parameter = list(
    support = 0.05,
    confidence = 0.6
  )
)
## Apriori
## 
## Parameter specification:
##  confidence minval smax arem  aval originalSupport maxtime support minlen
##         0.6    0.1    1 none FALSE            TRUE       5    0.05      1
##  maxlen target  ext
##      10  rules TRUE
## 
## Algorithmic control:
##  filter tree heap memopt load sort verbose
##     0.1 TRUE TRUE  FALSE TRUE    2    TRUE
## 
## Absolute minimum support count: 2039 
## 
## set item appearances ...[0 item(s)] done [0.00s].
## set transactions ...[193 item(s), 40793 transaction(s)] done [0.00s].
## sorting and recoding items ... [7 item(s)] done [0.00s].
## creating transaction tree ... done [0.00s].
## checking subsets of size 1 2 3 done [0.00s].
## writing ... [8 rule(s)] done [0.00s].
## creating S4 object  ... done [0.00s].
rules_2 <- rules_2[!is.redundant(rules_2)]
rules_2_by_lift <- sort(rules_2, by = "lift", decreasing = TRUE)
inspect(head(rules_2_by_lift, n = 10))
##     lhs                     rhs           support    confidence coverage  
## [1] {genre=Electronic}   => {language=en} 0.08109234 0.9772526  0.08297992
## [2] {listens=low}        => {language=en} 0.28482828 0.9768791  0.29156963
## [3] {listens=medium}     => {language=en} 0.32471257 0.9688414  0.33515554
## [4] {genre=Experimental} => {language=en} 0.10244405 0.9651270  0.10614566
## [5] {genre=Rock}         => {language=en} 0.13271885 0.9540088  0.13911701
## [6] {}                   => {language=en} 0.93861692 0.9386169  1.00000000
##     lift     count
## [1] 1.041162  3308
## [2] 1.040764 11619
## [3] 1.032201 13246
## [4] 1.028244  4179
## [5] 1.016398  5414
## [6] 1.000000 38289
plot(
  head(rules_2, n = 20),
  method = "graph",
  main = "Association Rules Network (Approach 2)"
)
## Available control parameters (with default values):
## layout    =  stress
## circular  =  FALSE
## ggraphdots    =  NULL
## edges     =  <environment>
## nodes     =  <environment>
## nodetext  =  <environment>
## colors    =  c("#EE0000FF", "#EEEEEEFF")
## engine    =  ggplot2
## max   =  100
## verbose   =  FALSE

By increasing the minimum support and confidence thresholds, the number of extracted rules decreases significantly. The resulting network is simpler and easier to read, with fewer nodes and connections. This filtering step allows us to focus on more robust and reliable associations. Compared to the first approach, it also exhibit slightly higher lift values and are less redundant. However, many of the remainiing rules still involve the English language, confirming its strong influence across the dataset.

Approach 3: Focus on Strong Multi-Item Rules

Third try with a focus on strong rules involving multiple items.

rules_3 <- apriori(
  tracks_basket,
  parameter = list(
    support = 0.03,
    confidence = 0.7,
    minlen = 2,
    maxlen = 4
  )
)
## Apriori
## 
## Parameter specification:
##  confidence minval smax arem  aval originalSupport maxtime support minlen
##         0.7    0.1    1 none FALSE            TRUE       5    0.03      2
##  maxlen target  ext
##       4  rules TRUE
## 
## Algorithmic control:
##  filter tree heap memopt load sort verbose
##     0.1 TRUE TRUE  FALSE TRUE    2    TRUE
## 
## Absolute minimum support count: 1223 
## 
## set item appearances ...[0 item(s)] done [0.00s].
## set transactions ...[193 item(s), 40793 transaction(s)] done [0.00s].
## sorting and recoding items ... [10 item(s)] done [0.00s].
## creating transaction tree ... done [0.00s].
## checking subsets of size 1 2 3 done [0.00s].
## writing ... [16 rule(s)] done [0.00s].
## creating S4 object  ... done [0.00s].
rules_3 <- rules_3[!is.redundant(rules_3)]
summary(rules_3)
## set of 13 rules
## 
## rule length distribution (lhs + rhs):sizes
## 2 3 
## 9 4 
## 
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   2.000   2.000   2.000   2.308   3.000   3.000 
## 
## summary of quality measures:
##     support          confidence        coverage            lift       
##  Min.   :0.03135   Min.   :0.8816   Min.   :0.03179   Min.   :0.9392  
##  1st Qu.:0.04464   1st Qu.:0.9594   1st Qu.:0.04506   1st Qu.:1.0222  
##  Median :0.04773   Median :0.9688   Median :0.04895   Median :1.0322  
##  Mean   :0.11834   Mean   :0.9630   Mean   :0.12467   Mean   :1.0260  
##  3rd Qu.:0.13272   3rd Qu.:0.9772   3rd Qu.:0.13912   3rd Qu.:1.0411  
##  Max.   :0.32908   Max.   :0.9924   Max.   :0.37327   Max.   :1.0573  
##      count      
##  Min.   : 1279  
##  1st Qu.: 1821  
##  Median : 1947  
##  Mean   : 4828  
##  3rd Qu.: 5414  
##  Max.   :13424  
## 
## mining info:
##           data ntransactions support confidence
##  tracks_basket         40793    0.03        0.7
##                                                                                                       call
##  apriori(data = tracks_basket, parameter = list(support = 0.03, confidence = 0.7, minlen = 2, maxlen = 4))
inspect(head(sort(rules_3, by = "lift"), n = 10))
##      lhs                                     rhs           support   
## [1]  {listens=low, genre=Experimental}    => {language=en} 0.04471355
## [2]  {listens=medium, genre=Electronic}   => {language=en} 0.03135342
## [3]  {genre=Electronic}                   => {language=en} 0.08109234
## [4]  {listens=medium, genre=Experimental} => {language=en} 0.03152502
## [5]  {listens=low}                        => {language=en} 0.28482828
## [6]  {listens=medium, genre=Rock}         => {language=en} 0.04772878
## [7]  {listens=medium}                     => {language=en} 0.32471257
## [8]  {genre=Experimental}                 => {language=en} 0.10244405
## [9]  {genre=Punk}                         => {language=en} 0.03777609
## [10] {genre=Pop}                          => {language=en} 0.04464001
##      confidence coverage   lift     count
## [1]  0.9923830  0.04505675 1.057282  1824
## [2]  0.9861218  0.03179467 1.050612  1279
## [3]  0.9772526  0.08297992 1.041162  3308
## [4]  0.9772036  0.03226044 1.041110  1286
## [5]  0.9768791  0.29156963 1.040764 11619
## [6]  0.9749624  0.04895448 1.038722  1947
## [7]  0.9688414  0.33515554 1.032201 13246
## [8]  0.9651270  0.10614566 1.028244  4179
## [9]  0.9619226  0.03927144 1.024830  1541
## [10] 0.9594310  0.04652759 1.022175  1821
plot(
  head(rules_3, n = 20),
  method = "graph",
  main = "Association Rules Network (Approach 3)"
)
## Available control parameters (with default values):
## layout    =  stress
## circular  =  FALSE
## ggraphdots    =  NULL
## edges     =  <environment>
## nodes     =  <environment>
## nodetext  =  <environment>
## colors    =  c("#EE0000FF", "#EEEEEEFF")
## engine    =  ggplot2
## max   =  100
## verbose   =  FALSE

In this third approach, we explicitly focus on multi-item rules by increasing the minimum rule length. This allows us to identify more specific associations involving combinations of genres and listening levels.

The network representation shows a more fragmented structure, with fewer but more specific associations. This confirms that increasing rule complexity leads to more targeted patterns, at the cost of reduced generality.

ECLAT Comparison

ECLAT is an alternative algorithm for finding frequent itemsets. Let’s compare with Apriori.

itemsets_eclat <- eclat(
  tracks_basket,
  parameter = list(
    support = 0.01,
    minlen = 2,
    maxlen = 4
  )
)
## Eclat
## 
## parameter specification:
##  tidLists support minlen maxlen            target  ext
##     FALSE    0.01      2      4 frequent itemsets TRUE
## 
## algorithmic control:
##  sparse sort verbose
##       7   -2    TRUE
## 
## Absolute minimum support count: 407 
## 
## create itemset ... 
## set transactions ...[193 item(s), 40793 transaction(s)] done [0.00s].
## sorting and recoding items ... [27 item(s)] done [0.00s].
## creating sparse bit matrix ... [27 row(s), 40793 column(s)] done [0.00s].
## writing  ... [62 set(s)] done [0.00s].
## Creating S4 object  ... done [0.00s].
summary(itemsets_eclat)
## set of 62 itemsets
## 
## most frequent items:
##      language=en      listens=low   listens=medium     listens=high 
##               41               16               15               12 
## genre=Electronic          (Other) 
##                7               52 
## 
## element (itemset/transaction) length distribution:sizes
##  2  3 
## 43 19 
## 
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   2.000   2.000   2.000   2.306   3.000   3.000 
## 
## summary of quality measures:
##     support            count        
##  Min.   :0.01000   Min.   :  408.0  
##  1st Qu.:0.01382   1st Qu.:  563.8  
##  Median :0.02022   Median :  825.0  
##  Mean   :0.04145   Mean   : 1690.9  
##  3rd Qu.:0.03517   3rd Qu.: 1434.5  
##  Max.   :0.32908   Max.   :13424.0  
## 
## includes transaction ID lists: FALSE 
## 
## mining info:
##           data ntransactions support
##  tracks_basket         40793    0.01
##                                                                                   call
##  eclat(data = tracks_basket, parameter = list(support = 0.01, minlen = 2, maxlen = 4))
rules_eclat <- ruleInduction(
  itemsets_eclat,
  transactions = tracks_basket,
  confidence = 0.5
)

inspect(head(sort(rules_eclat, by = "lift"), n = 10))
##      lhs                         rhs               support confidence     lift itemset
## [1]  {genre=International}    => {listens=high} 0.01409556  0.8273381 2.216432       8
## [2]  {genre=Improv}           => {language=en}  0.01139901  1.0000000 1.065397       2
## [3]  {listens=low,                                                                    
##       genre=Folk}             => {language=en}  0.01088422  1.0000000 1.065397      32
## [4]  {listens=low,                                                                    
##       genre=Avant-Garde}      => {language=en}  0.01262472  0.9980620 1.063333      17
## [5]  {listens=low,                                                                    
##       genre=Experimental}     => {language=en}  0.04471355  0.9923830 1.057282      46
## [6]  {genre=Spoken}           => {language=en}  0.01063908  0.9908676 1.055668       1
## [7]  {listens=medium,                                                                 
##       genre=Electronic}       => {language=en}  0.03135342  0.9861218 1.050612      40
## [8]  {genre=Loud-Rock}        => {language=en}  0.01174221  0.9855967 1.050052       4
## [9]  {listens=low,                                                                    
##       genre=Electronic}       => {language=en}  0.01958669  0.9852035 1.049633      39
## [10] {listens=medium,                                                                 
##       genre=Experimental Pop} => {language=en}  0.01115387  0.9827214 1.046989      14

ECLAT was used as an alternative algorithm to Apriori in order to compare the resulting rule sets. While ECLAT produces a higher number of rules under similar parameters, the average lift values remain lower than the best try obtained with Apriori.

This suggests that both algorithms capture similar underlying patterns in the data, with differences mainly related to computational strategy rather than rule quality.

Algorithm Comparison

comparison <- data.frame(
  Algorithm = c("Apriori_1", "Apriori_2", "Apriori_3", "ECLAT"),
  Support = c(0.01, 0.05, 0.03, 0.01),
  Confidence = c(0.5, 0.6, 0.7, 0.5),
  N_Rules = c(
    length(rules_1),
    length(rules_2),
    length(rules_3),
    length(rules_eclat)
  ),
  Avg_Lift = c(
    mean(quality(rules_1)$lift),
    mean(quality(rules_2)$lift),
    mean(quality(rules_3)$lift),
    mean(quality(rules_eclat)$lift)
  )
)

print(comparison)
##   Algorithm Support Confidence N_Rules Avg_Lift
## 1 Apriori_1    0.01        0.5      31 1.074269
## 2 Apriori_2    0.05        0.6       6 1.026462
## 3 Apriori_3    0.03        0.7      13 1.025998
## 4     ECLAT    0.01        0.5      42 1.049209

Grouped Visualization for the first apriori approach

plot(
  rules_1,
  method = "grouped",
  main = "Grouped Association Rules"
)
## Available control parameters (with default values):
## k     =  20
## aggr.fun  =  function (x, ...)  UseMethod("mean")
## rhs_max   =  10
## lhs_label_items   =  2
## col   =  c("#EE0000FF", "#EEEEEEFF")
## groups    =  NULL
## engine    =  ggplot2
## verbose   =  FALSE

The grouped visualization helps summarize the extracted rules by clustering similar left-hand-side itemsets. This representation facilitates the identification of recurring patterns involving genres, language, and popularity levels, although the interpretability remains limited by the dominance of certain items, especially the english language.

Conclusion

This association rules analysis highlights recurring co-occurrence patterns between genre, language, and popularity categories. While many rules are influenced by the dominant presence of English-language tracks, varying the algorithm parameters and rule complexity reveals patterns at different levels of granularity.

The discretization strategy enabled interpretable results, but the analysis also illustrates the limitations of association rules when applied to imbalanced datasets. Future work could explore alternative discretization schemes or hierarchical genre representations to extract more nuanced associations.