2008年12月20日 星期六

clustering on thousands of songs ?

最近在做自己的research...然後要把數千首的音樂做分群(clustering),,,
input data是一堆mp3的音樂資料(每首約30秒), 透過imdct擷取之後可得到每秒38個frame的imdct值.
目前clustering的作法是以frame為單位做分群,,,
clustering的作法是用cast的作法....
大概評估了一下記憶體的使用量....3k * 30 * 38 * dimensions= 36M * dimensions
如果我們要建一個distance matrix, 則要 n^2 / 2 的memory size, n為matrix的dimension, 以數千首音樂為例, n = 36M.
這個需求量遠大於目前機器可以容納的physical memory 的大小, 所以透過disk的方式記錄distance matrix; 目前的話一個block 約 64M.
然後如果目前cache buffer裡面沒有這個similarity的值的話, 就更新buffer的值, 透過fully buffer I/O.
更進階的做法可以模擬OS的page fault algorithm, 來計算哪個page要被swap出去, 整個還蠻有趣的.
只是分群真的分好久....