In [1]:
import librosa
import os

In [2]:
import mir_eval

In [3]:
from collections import OrderedDict

In [4]:
import pandas as pd
import numpy as np
np.set_printoptions(precision=3)
pd.set_option('precision', 4, "display.max_rows", 999)

In [5]:
def make_beatles_corpus(iso_path):
    
    # Beat files
    beat_path = os.path.join(iso_path, 'beat')
    
    annotations = librosa.util.find_files(beat_path, ext='txt')
    
    audio = [ann.replace('/beat/', '/audio/').replace('.txt', '.flac') for ann in annotations]
    
    
    data = []
    for aud, ann in zip(audio, annotations):
        if os.path.exists(aud) and os.path.exists(ann):
            data.append((aud, ann))
    
    return pd.DataFrame(data=data, columns=['audio', 'annotation'])

In [6]:
def make_smc_data(smc_path):
    
    # Beat files
    beat_path = os.path.join(smc_path, 'SMC_MIREX_Annotations')
    annotations = librosa.util.find_files(beat_path, ext='txt')
    
    # Audio files
    audio_path = os.path.join(smc_path, 'SMC_MIREX_Audio')
    audio = librosa.util.find_files(audio_path, ext='wav')
    
    data = zip(audio, annotations)
    
    return pd.DataFrame(data=data, columns=['audio', 'annotation'])

In [7]:
def make_output_path(base, outpath):
    
    root = os.path.splitext(base)[0]
    
    output = os.path.join(outpath, os.path.extsep.join([root, 'json']))
    
    return output

In [8]:
def analyze(dframe, outpath='/home/bmcfee/git/librosa_parameters/data/beat/'):
    
    index = dframe.index[0]
    
    base = os.path.basename(dframe['audio'][index])
    
    outfile = make_output_path(base, outpath)
    
    if os.path.exists(outfile):
        print 'Cached {}'.format(base)
        data = pd.read_json(outfile, orient='records')
        return data
    else:
        print 'Processing {}'.format(base)
    
    # Load the truth
    ref_times = pd.read_table(dframe['annotation'][index], header=None, sep='\s+',
                              usecols=[0], error_bad_lines=False)[0].values

    # Load the audio
    sr = 22050
    y, _ = librosa.load(dframe['audio'][index], None)
    y = librosa.resample(y, _, sr, res_type='sinc_fastest')
    
    # Construct the output container
    results = []
    
    # Onset strength parameters
    
    for fmax in [8000, 11025]:
        for n_mels in [32, 64, 128]:
            S = librosa.feature.melspectrogram(y=y, sr=sr, fmax=fmax, n_mels=n_mels)
            S = librosa.logamplitude(S)
            
            for aggregate in [np.mean, np.median]:
                # Compute the onset detection function
                oenv = librosa.onset.onset_strength(S=S, sr=sr,
                                                    aggregate=aggregate)
                
                    # Tempo estimator parameters
                for ac_size in [2, 4, 8]:
                    for std_bpm in [0.5, 1.0, 2.0]:
                        tempo = librosa.beat.estimate_tempo(oenv,
                                                                    sr=sr,
                                                                    ac_size=ac_size,
                                                                    std_bpm=std_bpm)
                                
                        for tightness in [50, 100, 400]:
                            # Evaluate the predictions
                            params = {'aggregate': aggregate.__name__,
                                              'fmax': fmax,
                                              'n_mels': n_mels,
                                              'ac_size': ac_size,
                                              'std_bpm': std_bpm,
                                              'tightness': tightness}
                            
                            _, beats = librosa.beat.beat_track(sr=sr,
                                                                       onset_envelope=oenv,
                                                                       trim=False, 
                                                                       tightness=tightness,
                                                                       bpm=tempo)
                                    
                            est_times = librosa.frames_to_time(beats, sr=sr)
                            scores = mir_eval.beat.evaluate(ref_times, est_times)
                            
                            cont = OrderedDict(index=index)
                            cont.update(params)
                            cont.update(scores)
                            results.append(cont)
    # Blow away the cache
    #librosa.cache.clear()
    data = pd.DataFrame.from_dict(results, orient='columns')
    data.to_json(outfile, orient='records')
        
    return data

In [9]:
def analyze_corpus(corpus):
    
    results = None
    for idx in corpus.index:
        new_results = analyze(corpus.loc[[idx]])
        if results is None:
            results = new_results
        else:
            results = pd.concat([results, new_results])
            
    return results

In [10]:
from joblib import Parallel, delayed

In [11]:
def p_analyze_corpus(corpus, n_jobs=3):
    
    results = None
    
    dfunc = delayed(analyze)
    
    results = Parallel(n_jobs=n_jobs, verbose=10)(dfunc(corpus.loc[[idx]])
                                                  for idx in corpus.index)

    return pd.concat(results)


In [12]:
smc_data = make_smc_data('/home/bmcfee/data/SMC_Mirex/')

In [13]:
smc_results = p_analyze_corpus(smc_data)


[Parallel(n_jobs=3)]: Done   1 out of  35 | elapsed:    0.1s remaining:    2.8s
[Parallel(n_jobs=3)]: Done  21 out of 217 | elapsed:  3.6min remaining: 33.6min
[Parallel(n_jobs=3)]: Done  43 out of 217 | elapsed:  6.5min remaining: 26.4min
[Parallel(n_jobs=3)]: Done  65 out of 217 | elapsed:  9.0min remaining: 21.0min
[Parallel(n_jobs=3)]: Done  87 out of 217 | elapsed: 11.7min remaining: 17.4min
[Parallel(n_jobs=3)]: Done 109 out of 217 | elapsed: 14.6min remaining: 14.5min
[Parallel(n_jobs=3)]: Done 131 out of 217 | elapsed: 17.2min remaining: 11.3min
[Parallel(n_jobs=3)]: Done 153 out of 217 | elapsed: 19.9min remaining:  8.3min
[Parallel(n_jobs=3)]: Done 175 out of 217 | elapsed: 22.6min remaining:  5.4min
[Parallel(n_jobs=3)]: Done 197 out of 217 | elapsed: 25.6min remaining:  2.6min
[Parallel(n_jobs=3)]: Done 217 out of 217 | elapsed: 28.2min finished
Cached SMC_002.wav
Cached SMC_001.wav
Cached SMC_003.wav
Cached SMC_004.wav
Cached SMC_005.wav
Cached SMC_006.wav
Processing SMC_009.wavProcessing SMC_007.wav
Processing SMC_008.wav

Processing SMC_010.wavProcessing SMC_012.wavProcessing SMC_011.wav


Processing SMC_013.wavProcessing SMC_015.wavProcessing SMC_014.wav


Processing SMC_016.wavProcessing SMC_018.wavProcessing SMC_017.wav


Processing SMC_019.wavProcessing SMC_022.wavProcessing SMC_021.wav


Processing SMC_023.wavProcessing SMC_026.wavProcessing SMC_024.wav


Processing SMC_027.wavProcessing SMC_030.wavProcessing SMC_028.wav


Processing SMC_032.wavProcessing SMC_034.wavProcessing SMC_033.wav


Processing SMC_036.wavProcessing SMC_037.wavProcessing SMC_035.wav


Processing SMC_041.wavProcessing SMC_043.wavProcessing SMC_038.wav


Processing SMC_044.wavProcessing SMC_047.wavProcessing SMC_042.wav


Processing SMC_048.wavProcessing SMC_052.wavProcessing SMC_046.wav


Processing SMC_054.wavProcessing SMC_056.wavProcessing SMC_051.wav


Processing SMC_057.wavProcessing SMC_059.wavProcessing SMC_055.wav


Processing SMC_060.wavProcessing SMC_061.wavProcessing SMC_058.wav


Processing SMC_065.wavProcessing SMC_064.wavProcessing SMC_063.wav


Processing SMC_069.wavProcessing SMC_067.wavProcessing SMC_066.wav


Processing SMC_073.wavProcessing SMC_071.wavProcessing SMC_068.wav


Processing SMC_076.wavProcessing SMC_074.wavProcessing SMC_072.wav


Processing SMC_084.wavProcessing SMC_079.wavProcessing SMC_075.wav


Processing SMC_087.wavProcessing SMC_082.wavProcessing SMC_080.wav


Processing SMC_092.wavProcessing SMC_085.wavProcessing SMC_086.wav


Processing SMC_096.wavProcessing SMC_089.wavProcessing SMC_088.wav


Processing SMC_100.wavProcessing SMC_095.wavProcessing SMC_093.wav


Processing SMC_105.wavProcessing SMC_098.wavProcessing SMC_099.wav


Processing SMC_111.wavProcessing SMC_101.wavProcessing SMC_103.wav


Processing SMC_113.wavProcessing SMC_104.wavProcessing SMC_106.wav


Processing SMC_117.wavProcessing SMC_109.wavProcessing SMC_114.wav


Processing SMC_120.wavProcessing SMC_116.wavProcessing SMC_118.wav


Processing SMC_126.wavProcessing SMC_119.wavProcessing SMC_121.wav


Processing SMC_135.wavProcessing SMC_124.wavProcessing SMC_127.wav


Processing SMC_137.wavProcessing SMC_130.wavProcessing SMC_133.wav


Processing SMC_142.wavProcessing SMC_139.wavProcessing SMC_140.wav


Processing SMC_147.wavProcessing SMC_143.wavProcessing SMC_146.wav


Processing SMC_150.wavProcessing SMC_149.wavProcessing SMC_148.wav


Processing SMC_151.wavProcessing SMC_152.wavProcessing SMC_153.wav


Processing SMC_154.wavProcessing SMC_158.wavProcessing SMC_157.wav


Processing SMC_161.wavProcessing SMC_166.wavProcessing SMC_159.wav


Processing SMC_168.wavProcessing SMC_169.wavProcessing SMC_167.wav


Processing SMC_171.wavProcessing SMC_172.wavProcessing SMC_170.wav


Processing SMC_174.wavProcessing SMC_175.wavProcessing SMC_173.wav


Processing SMC_178.wavProcessing SMC_179.wavProcessing SMC_176.wav


Processing SMC_182.wavProcessing SMC_184.wavProcessing SMC_181.wav


Processing SMC_188.wavProcessing SMC_190.wavProcessing SMC_187.wav


Processing SMC_194.wavProcessing SMC_193.wavProcessing SMC_192.wav


Processing SMC_198.wavProcessing SMC_195.wavProcessing SMC_197.wav


Processing SMC_203.wavProcessing SMC_199.wavProcessing SMC_202.wav


Processing SMC_205.wavProcessing SMC_204.wavProcessing SMC_206.wav


Processing SMC_207.wavProcessing SMC_208.wavProcessing SMC_209.wav


Processing SMC_212.wavProcessing SMC_211.wavProcessing SMC_213.wav


Processing SMC_215.wavProcessing SMC_214.wavProcessing SMC_216.wav


Processing SMC_217.wavProcessing SMC_219.wavProcessing SMC_222.wav


Processing SMC_221.wavProcessing SMC_220.wavProcessing SMC_224.wav


Processing SMC_225.wavProcessing SMC_223.wavProcessing SMC_229.wav


Processing SMC_227.wavProcessing SMC_226.wavProcessing SMC_236.wav


Processing SMC_235.wavProcessing SMC_232.wavProcessing SMC_239.wav


Processing SMC_241.wavProcessing SMC_237.wavProcessing SMC_243.wav


Processing SMC_244.wavProcessing SMC_242.wavProcessing SMC_248.wav


Processing SMC_252.wavProcessing SMC_249.wavProcessing SMC_251.wav


Processing SMC_256.wavProcessing SMC_253.wavProcessing SMC_254.wav


Processing SMC_257.wavProcessing SMC_255.wavProcessing SMC_259.wav


Processing SMC_261.wavProcessing SMC_258.wavProcessing SMC_262.wav


Processing SMC_264.wavProcessing SMC_260.wavProcessing SMC_265.wav


Processing SMC_269.wavProcessing SMC_263.wavProcessing SMC_271.wav


Processing SMC_273.wavProcessing SMC_266.wavProcessing SMC_274.wav


Processing SMC_276.wavProcessing SMC_272.wavProcessing SMC_277.wav


Processing SMC_279.wavProcessing SMC_275.wavProcessing SMC_280.wav


Processing SMC_282.wavProcessing SMC_278.wavProcessing SMC_283.wav


Processing SMC_285.wavProcessing SMC_281.wavProcessing SMC_286.wav


Processing SMC_288.wavProcessing SMC_284.wavProcessing SMC_289.wav


Processing SMC_287.wav

In [14]:
smc_results.to_json('/home/bmcfee/git/librosa_parameters/smc_log_results.json', orient='records')

In [12]:
smc_results = pd.read_json('/home/bmcfee/git/librosa_parameters/smc_log_results.json', orient='records')

In [13]:
smc_scores = smc_results.groupby(['aggregate', 'fmax', 'n_mels', 'ac_size', 'std_bpm', 'tightness']).mean()

In [14]:
best_igain = smc_scores['Information gain'].argmax()

In [15]:
best_fmeas = smc_scores['F-measure'].argmax()

In [16]:
best_amlt = smc_scores['Any Metric Level Total'].argmax()

In [17]:
best_cmlt = smc_scores['Correct Metric Level Total'].argmax()

In [18]:
smc_scores.loc[[best_igain, best_fmeas, best_amlt, best_cmlt]]


Out[18]:
Any Metric Level Continuous Any Metric Level Total Cemgil Cemgil Best Metric Level Correct Metric Level Continuous Correct Metric Level Total F-measure Goto Information gain P-score index
aggregate fmax n_mels ac_size std_bpm tightness
median 8000 128 8 2 100 0.173 0.316 0.238 0.305 0.105 0.172 0.353 0.078 0.176 0.480 108
mean 8000 128 2 2 50 0.137 0.315 0.249 0.321 0.072 0.138 0.366 0.055 0.164 0.476 108
median 8000 128 8 1 50 0.155 0.334 0.243 0.303 0.097 0.172 0.361 0.078 0.174 0.493 108
2 1 100 0.163 0.328 0.240 0.299 0.107 0.177 0.356 0.083 0.172 0.493 108

In [19]:
smc_scores.loc[best_igain]


Out[19]:
Any Metric Level Continuous          0.173
Any Metric Level Total               0.316
Cemgil                               0.238
Cemgil Best Metric Level             0.305
Correct Metric Level Continuous      0.105
Correct Metric Level Total           0.172
F-measure                            0.353
Goto                                 0.078
Information gain                     0.176
P-score                              0.480
index                              108.000
Name: (median, 8000, 128, 8, 2.0, 100), dtype: float64

In [20]:
smc_scores.loc[best_fmeas]


Out[20]:
Any Metric Level Continuous          0.137
Any Metric Level Total               0.315
Cemgil                               0.249
Cemgil Best Metric Level             0.321
Correct Metric Level Continuous      0.072
Correct Metric Level Total           0.138
F-measure                            0.366
Goto                                 0.055
Information gain                     0.164
P-score                              0.476
index                              108.000
Name: (mean, 8000, 128, 2, 2.0, 50), dtype: float64

In [21]:
smc_scores.loc[best_amlt]


Out[21]:
Any Metric Level Continuous          0.155
Any Metric Level Total               0.334
Cemgil                               0.243
Cemgil Best Metric Level             0.303
Correct Metric Level Continuous      0.097
Correct Metric Level Total           0.172
F-measure                            0.361
Goto                                 0.078
Information gain                     0.174
P-score                              0.493
index                              108.000
Name: (median, 8000, 128, 8, 1.0, 50), dtype: float64

In [22]:
smc_scores.loc[best_cmlt]


Out[22]:
Any Metric Level Continuous          0.163
Any Metric Level Total               0.328
Cemgil                               0.240
Cemgil Best Metric Level             0.299
Correct Metric Level Continuous      0.107
Correct Metric Level Total           0.177
F-measure                            0.356
Goto                                 0.083
Information gain                     0.172
P-score                              0.493
index                              108.000
Name: (median, 8000, 128, 2, 1.0, 100), dtype: float64


In [12]:
beatles_data = make_beatles_corpus('/home/bmcfee/data/beatles_iso/')

In [13]:
beatles_results = p_analyze_corpus(beatles_data)


[Parallel(n_jobs=3)]: Done   1 out of 179 | elapsed:  6.4min remaining: 1138.7min
[Parallel(n_jobs=3)]: Done  19 out of 179 | elapsed: 24.7min remaining: 208.1min
[Parallel(n_jobs=3)]: Done  37 out of 179 | elapsed: 51.6min remaining: 197.9min
[Parallel(n_jobs=3)]: Done  55 out of 179 | elapsed: 73.6min remaining: 166.0min
[Parallel(n_jobs=3)]: Done  73 out of 179 | elapsed: 89.3min remaining: 129.7min
[Parallel(n_jobs=3)]: Done  91 out of 179 | elapsed: 104.8min remaining: 101.4min
[Parallel(n_jobs=3)]: Done 109 out of 179 | elapsed: 122.5min remaining: 78.7min
[Parallel(n_jobs=3)]: Done 127 out of 179 | elapsed: 148.8min remaining: 60.9min
[Parallel(n_jobs=3)]: Done 145 out of 179 | elapsed: 168.0min remaining: 39.4min
[Parallel(n_jobs=3)]: Done 163 out of 179 | elapsed: 193.1min remaining: 19.0min
[Parallel(n_jobs=3)]: Done 179 out of 179 | elapsed: 211.2min finished
Skipping line 286: expected 2 fields, saw 3

Processing 01_-_I_Saw_Her_Standing_There.flac
Processing 02_-_Misery.flac
Processing 03_-_Anna_(Go_To_Him).flac
Processing 06_-_Ask_Me_Why.flacProcessing 04_-_Chains.flacProcessing 05_-_Boys.flac


Processing 10_-_Baby_It's_You.flacProcessing 07_-_Please_Please_Me.flacProcessing 08_-_Love_Me_Do.flac


Processing 13_-_There's_A_Place.flacProcessing 09_-_P._S._I_Love_You.flacProcessing 12_-_A_Taste_Of_Honey.flac


Processing 02_-_All_I've_Got_To_Do.flacProcessing 11_-_Do_You_Want_To_Know_A_Secret.flacProcessing 01_-_It_Won't_Be_Long.flac


Processing 04_-_Don't_Bother_Me.flacProcessing 14_-_Twist_And_Shout.flacProcessing 03_-_All_My_Loving.flac


Processing 08_-_Roll_Over_Beethoven.flacProcessing 05_-_Little_Child.flacProcessing 07_-_Please_Mister_Postman.flac


Processing 11_-_I_Wanna_Be_Your_Man.flacProcessing 06_-_Till_There_Was_You.flacProcessing 10_-_You_Really_Got_A_Hold_On_Me.flac


Processing 13_-_Not_A_Second_Time.flacProcessing 09_-_Hold_Me_Tight.flacProcessing 14_-_Money.flac


Processing 02_-_I_Should_Have_Known_Better.flacProcessing 12_-_Devil_In_Her_Heart.flacProcessing 03_-_If_I_Fell.flac


Processing 05_-_And_I_Love_Her.flacProcessing 01_-_A_Hard_Day's_Night.flacProcessing 07_-_Can't_Buy_Me_Love.flac


Processing 08_-_Any_Time_At_All.flacProcessing 04_-_I'm_Happy_Just_To_Dance_With_You.flacProcessing 10_-_Things_We_Said_Today.flac


Processing 12_-_You_Can't_Do_That.flacProcessing 06_-_Tell_Me_Why.flacProcessing 13_-_I'll_Be_Back.flac


Processing 02_-_I'm_a_Loser.flacProcessing 09_-_I'll_Cry_Instead.flacProcessing 03_-_Baby's_In_Black.flac


Cached 05_-_I'll_Follow_the_Sun.flacProcessing 11_-_When_I_Get_Home.flacProcessing 07_-_Kansas_City-_Hey,_Hey,_Hey,_Hey.flac


Processing 06_-_Mr._Moonlight.flac
Processing 01_-_No_Reply.flacProcessing 10_-_Honey_Don't.flacProcessing 09_-_Words_of_Love.flac


Processing 04_-_Rock_and_Roll_Music.flacProcessing 13_-_What_You're_Doing.flacProcessing 12_-_I_Don't_Want_to_Spoil_the_Party.flac


Processing 08_-_Eight_Days_a_Week.flacProcessing 03_-_You've_Got_To_Hide_Your_Love_Away.flacProcessing 01_-_Help!.flac


Processing 11_-_Every_Little_Thing.flacProcessing 05_-_Another_Girl.flacProcessing 04_-_I_Need_You.flac


Processing 14_-_Everybody's_Trying_to_Be_My_Baby.flacProcessing 08_-_Act_Naturally.flacProcessing 07_-_Ticket_To_Ride.flac


Processing 02_-_The_Night_Before.flacProcessing 10_-_You_Like_Me_Too_Much.flacProcessing 12_-_I've_Just_Seen_a_Face.flac


Processing 06_-_You're_Going_To_Lose_That_Girl.flacProcessing 13_-_Yesterday.flacProcessing 01_-_Drive_My_Car.flac


Processing 09_-_It's_Only_Love.flacProcessing 02_-_Norwegian_Wood_(This_Bird_Has_Flown).flacProcessing 05_-_Think_For_Yourself.flac


Processing 11_-_Tell_Me_What_You_See.flacProcessing 04_-_Nowhere_Man.flacProcessing 06_-_The_Word.flac


Processing 14_-_Dizzy_Miss_Lizzy.flacProcessing 07_-_Michelle.flacProcessing 09_-_Girl.flac


Processing 03_-_You_Won't_See_Me.flacProcessing 10_-_I'm_Looking_Through_You.flacProcessing 13_-_If_I_Needed_Someone.flac


Processing 08_-_What_Goes_On.flacProcessing 12_-_Wait.flacProcessing 03_-_I'm_Only_Sleeping.flac


Processing 11_-_In_My_Life.flacProcessing 01_-_Taxman.flacProcessing 05_-_Here,_There_And_Everywhere.flac


Processing 14_-_Run_For_Your_Life.flacProcessing 06_-_Yellow_Submarine.flacProcessing 07_-_She_Said_She_Said.flac


Processing 02_-_Eleanor_Rigby.flacProcessing 09_-_And_Your_Bird_Can_Sing.flacProcessing 11_-_Doctor_Robert.flac


Processing 04_-_Love_You_To.flacProcessing 10_-_For_No_One.flacProcessing 14_-_Tomorrow_Never_Knows.flac


Processing 08_-_Good_Day_Sunshine.flacProcessing 13_-_Got_To_Get_You_Into_My_Life.flacProcessing 04_-_Getting_Better.flac


Processing 12_-_I_Want_To_Tell_You.flacProcessing 02_-_With_A_Little_Help_From_My_Friends.flacProcessing 06_-_She's_Leaving_Home.flac


Processing 01_-_Sgt._Pepper's_Lonely_Hearts_Club_Band.flacProcessing 05_-_Fixing_A_Hole.flacProcessing 10_-_Lovely_Rita.flac


Processing 03_-_Lucy_In_The_Sky_With_Diamonds.flacProcessing 08_-_Within_You_Without_You.flacProcessing 12_-_Sgt._Pepper's_Lonely_Hearts_Club_Band_(Reprise).flac


Processing 07_-_Being_For_The_Benefit_Of_Mr._Kite!.flacProcessing 02_-_The_Fool_On_The_Hill.flacProcessing 01_-_Magical_Mystery_Tour.flac


Processing 09_-_When_I'm_Sixty-Four.flacProcessing 04_-_Blue_Jay_Way.flacProcessing 03_-_Flying.flac


Processing 11_-_Good_Morning_Good_Morning.flacProcessing 07_-_Hello_Goodbye.flacProcessing 05_-_Your_Mother_Should_Know.flac


Processing 13_-_A_Day_In_The_Life.flacProcessing 09_-_Penny_Lane.flacProcessing 06_-_I_Am_The_Walrus.flac


Processing 08_-_Strawberry_Fields_Forever.flacProcessing CD1_-_02_-_Dear_Prudence.flacProcessing 10_-_Baby_You're_A_Rich_Man.flac


Processing 11_-_All_You_Need_Is_Love.flacProcessing CD1_-_07_-_While_My_Guitar_Gently_Weeps.flacProcessing CD1_-_01_-_Back_in_the_USSR.flac


Processing CD1_-_04_-_Ob-La-Di,_Ob-La-Da.flacProcessing CD1_-_12_-_Piggies.flacProcessing CD1_-_03_-_Glass_Onion.flac


Processing CD1_-_08_-_Happiness_is_a_Warm_Gun.flacProcessing CD1_-_15_-_Why_Don't_We_Do_It_In_The_Road.flacProcessing CD1_-_05_-_Wild_Honey_Pie.flac


Processing CD1_-_11_-_Black_Bird.flacProcessing CD1_-_16_-_I_Will.flacProcessing CD1_-_06_-_The_Continuing_Story_of_Bungalow_Bill.flac


Processing CD1_-_13_-_Rocky_Raccoon.flacProcessing CD1_-_17_-_Julia.flacProcessing CD1_-_09_-_Martha_My_Dear.flac


Processing CD2_-_01_-_Birthday.flacProcessing CD2_-_03_-_Mother_Nature's_Son.flacProcessing CD1_-_10_-_I'm_So_Tired.flac


Processing CD2_-_04_-_Everybody's_Got_Something_To_Hide_Except_Me_and_My_Monkey.flacProcessing CD2_-_06_-_Helter_Skelter.flacProcessing CD1_-_14_-_Don't_Pass_Me_By.flac


Processing CD2_-_05_-_Sexy_Sadie.flacProcessing CD2_-_10_-_Savoy_Truffle.flacProcessing CD2_-_02_-_Yer_Blues.flac


Processing CD2_-_08_-_Revolution_1.flacProcessing CD2_-_13_-_Good_Night.flacProcessing CD2_-_07_-_Long_Long_Long.flac


Processing 01_-_Come_Together.flacProcessing 04_-_Oh!_Darling.flacProcessing CD2_-_09_-_Honey_Pie.flac


Processing 05_-_Octopus's_Garden.flacProcessing 07_-_Here_Comes_The_Sun.flacProcessing CD2_-_11_-_Cry_Baby_Cry.flac


Processing 08_-_Because.flacProcessing 09_-_You_Never_Give_Me_Your_Money.flacProcessing 02_-_Something.flac


Processing 10_-_Sun_King.flacProcessing 14_-_Golden_Slumbers.flacProcessing 03_-_Maxwell's_Silver_Hammer.flac


Processing 11_-_Mean_Mr_Mustard.flacProcessing 15_-_Carry_That_Weight.flacProcessing 06_-_I_Want_You.flac


Processing 12_-_Polythene_Pam.flacProcessing 17_-_Her_Majesty.flacProcessing 05_-_Dig_It.flac


Processing 13_-_She_Came_In_Through_The_Bathroom_Window.flacProcessing 01_-_Two_of_Us.flacProcessing 06_-_Let_It_Be.flac


Processing 16_-_The_End.flacProcessing 03_-_Across_the_Universe.flacProcessing 10_-_The_Long_and_Winding_Road.flac


Processing 02_-_Dig_a_Pony.flacProcessing 09_-_One_After_909.flac

Processing 12_-_Get_Back.flacProcessing 04_-_I_Me_Mine.flac

Processing 07_-_Maggie_Mae.flac
Processing 08_-_I've_Got_A_Feeling.flac
Processing 11_-_For_You_Blue.flac

In [17]:
beatles_results.to_json('/home/bmcfee/git/librosa_parameters/beatles_beat_results.json', orient='records')

In [23]:
beatles_results = pd.read_json('/home/bmcfee/git/librosa_parameters/beatles_beat_results.json', orient='records')

In [24]:
beatles_scores = beatles_results.groupby(['aggregate', 'fmax', 'n_mels', 'ac_size', 'std_bpm', 'tightness']).mean()

In [25]:
beatles_scores


Out[25]:
Any Metric Level Continuous Any Metric Level Total Cemgil Cemgil Best Metric Level Correct Metric Level Continuous Correct Metric Level Total F-measure Goto Information gain P-score index
aggregate fmax n_mels ac_size std_bpm tightness
mean 8000 32 2 0.5 50 0.492 0.722 0.536 0.602 0.432 0.578 0.690 0.503 0.428 0.714 89
100 0.575 0.735 0.543 0.613 0.494 0.588 0.698 0.520 0.450 0.720 89
400 0.591 0.731 0.542 0.611 0.513 0.591 0.694 0.525 0.445 0.721 89
1.0 50 0.530 0.783 0.556 0.627 0.463 0.628 0.719 0.536 0.454 0.743 89
100 0.620 0.802 0.567 0.641 0.527 0.643 0.732 0.570 0.478 0.755 89
400 0.645 0.800 0.570 0.642 0.552 0.645 0.731 0.581 0.477 0.755 89
2.0 50 0.514 0.765 0.554 0.622 0.440 0.601 0.716 0.536 0.451 0.736 89
100 0.595 0.779 0.562 0.633 0.496 0.610 0.725 0.547 0.474 0.743 89
400 0.627 0.779 0.564 0.636 0.521 0.611 0.724 0.553 0.474 0.742 89
4 0.5 50 0.492 0.722 0.536 0.602 0.432 0.578 0.690 0.503 0.428 0.714 89
100 0.575 0.735 0.543 0.613 0.494 0.588 0.698 0.520 0.450 0.720 89
400 0.591 0.731 0.542 0.611 0.513 0.591 0.694 0.525 0.445 0.721 89
1.0 50 0.530 0.783 0.556 0.627 0.463 0.628 0.719 0.536 0.454 0.743 89
100 0.620 0.802 0.567 0.641 0.527 0.643 0.732 0.570 0.478 0.755 89
400 0.645 0.800 0.570 0.642 0.552 0.645 0.731 0.581 0.477 0.755 89
2.0 50 0.514 0.765 0.554 0.622 0.440 0.601 0.716 0.536 0.451 0.736 89
100 0.595 0.779 0.562 0.633 0.496 0.610 0.725 0.547 0.474 0.743 89
400 0.627 0.779 0.564 0.636 0.521 0.611 0.724 0.553 0.474 0.742 89
8 0.5 50 0.492 0.722 0.536 0.602 0.432 0.578 0.690 0.503 0.428 0.714 89
100 0.575 0.735 0.543 0.613 0.494 0.588 0.698 0.520 0.450 0.720 89
400 0.591 0.731 0.542 0.611 0.513 0.591 0.694 0.525 0.445 0.721 89
1.0 50 0.530 0.783 0.556 0.627 0.463 0.628 0.719 0.536 0.454 0.743 89
100 0.620 0.802 0.567 0.641 0.527 0.643 0.732 0.570 0.478 0.755 89
400 0.645 0.800 0.570 0.642 0.552 0.645 0.731 0.581 0.477 0.755 89
2.0 50 0.514 0.765 0.554 0.622 0.440 0.601 0.716 0.536 0.451 0.736 89
100 0.595 0.779 0.562 0.633 0.496 0.610 0.725 0.547 0.474 0.743 89
400 0.627 0.779 0.564 0.636 0.521 0.611 0.724 0.553 0.474 0.742 89
64 2 0.5 50 0.539 0.725 0.553 0.613 0.468 0.588 0.704 0.503 0.441 0.724 89
100 0.587 0.731 0.557 0.620 0.502 0.591 0.706 0.514 0.456 0.727 89
400 0.600 0.727 0.551 0.617 0.519 0.591 0.700 0.525 0.453 0.724 89
1.0 50 0.578 0.783 0.570 0.640 0.495 0.628 0.727 0.542 0.467 0.746 89
100 0.634 0.794 0.575 0.649 0.533 0.634 0.731 0.559 0.483 0.750 89
400 0.656 0.796 0.571 0.651 0.550 0.631 0.725 0.564 0.484 0.746 89
2.0 50 0.577 0.790 0.577 0.646 0.483 0.620 0.733 0.547 0.472 0.748 89
100 0.624 0.799 0.582 0.653 0.516 0.625 0.738 0.553 0.489 0.753 89
400 0.648 0.798 0.579 0.654 0.536 0.622 0.733 0.559 0.489 0.748 89
4 0.5 50 0.539 0.725 0.553 0.613 0.468 0.588 0.704 0.503 0.441 0.724 89
100 0.587 0.731 0.557 0.620 0.502 0.591 0.706 0.514 0.456 0.727 89
400 0.600 0.727 0.551 0.617 0.519 0.591 0.700 0.525 0.453 0.724 89
1.0 50 0.578 0.783 0.570 0.640 0.495 0.628 0.727 0.542 0.467 0.746 89
100 0.634 0.794 0.575 0.649 0.533 0.634 0.731 0.559 0.483 0.750 89
400 0.656 0.796 0.571 0.651 0.550 0.631 0.725 0.564 0.484 0.746 89
2.0 50 0.577 0.790 0.577 0.646 0.483 0.620 0.733 0.547 0.472 0.748 89
100 0.624 0.799 0.582 0.653 0.516 0.625 0.738 0.553 0.489 0.753 89
400 0.648 0.798 0.579 0.654 0.536 0.622 0.733 0.559 0.489 0.748 89
8 0.5 50 0.539 0.725 0.553 0.613 0.468 0.588 0.704 0.503 0.441 0.724 89
100 0.587 0.731 0.557 0.620 0.502 0.591 0.706 0.514 0.456 0.727 89
400 0.600 0.727 0.551 0.617 0.519 0.591 0.700 0.525 0.453 0.724 89
1.0 50 0.578 0.783 0.570 0.640 0.495 0.628 0.727 0.542 0.467 0.746 89
100 0.634 0.794 0.575 0.649 0.533 0.634 0.731 0.559 0.483 0.750 89
400 0.656 0.796 0.571 0.651 0.550 0.631 0.725 0.564 0.484 0.746 89
2.0 50 0.577 0.790 0.577 0.646 0.483 0.620 0.733 0.547 0.472 0.748 89
100 0.624 0.799 0.582 0.653 0.516 0.625 0.738 0.553 0.489 0.753 89
400 0.648 0.798 0.579 0.654 0.536 0.622 0.733 0.559 0.489 0.748 89
128 2 0.5 50 0.541 0.724 0.565 0.623 0.470 0.589 0.711 0.508 0.446 0.730 89
100 0.593 0.726 0.566 0.627 0.511 0.591 0.710 0.520 0.457 0.730 89
400 0.601 0.719 0.562 0.622 0.525 0.591 0.705 0.536 0.451 0.728 89
1.0 50 0.598 0.801 0.583 0.660 0.499 0.629 0.734 0.553 0.479 0.747 89
100 0.656 0.808 0.586 0.666 0.542 0.633 0.737 0.559 0.491 0.749 89
400 0.670 0.808 0.586 0.666 0.559 0.634 0.735 0.575 0.491 0.750 89
2.0 50 0.587 0.799 0.591 0.663 0.488 0.626 0.743 0.559 0.479 0.751 89
100 0.639 0.805 0.594 0.669 0.531 0.629 0.746 0.564 0.492 0.754 89
400 0.662 0.807 0.596 0.672 0.551 0.631 0.746 0.581 0.496 0.754 89
4 0.5 50 0.541 0.724 0.565 0.623 0.470 0.589 0.711 0.508 0.446 0.730 89
100 0.593 0.726 0.566 0.627 0.511 0.591 0.710 0.520 0.457 0.730 89
400 0.601 0.719 0.562 0.622 0.525 0.591 0.705 0.536 0.451 0.728 89
1.0 50 0.598 0.801 0.583 0.660 0.499 0.629 0.734 0.553 0.479 0.747 89
100 0.656 0.808 0.586 0.666 0.542 0.633 0.737 0.559 0.491 0.749 89
400 0.670 0.808 0.586 0.666 0.559 0.634 0.735 0.575 0.491 0.750 89
2.0 50 0.587 0.799 0.591 0.663 0.488 0.626 0.743 0.559 0.479 0.751 89
100 0.639 0.805 0.594 0.669 0.531 0.629 0.746 0.564 0.492 0.754 89
400 0.662 0.807 0.596 0.672 0.551 0.631 0.746 0.581 0.496 0.754 89
8 0.5 50 0.541 0.724 0.565 0.623 0.470 0.589 0.711 0.508 0.446 0.730 89
100 0.593 0.726 0.566 0.627 0.511 0.591 0.710 0.520 0.457 0.730 89
400 0.601 0.719 0.562 0.622 0.525 0.591 0.705 0.536 0.451 0.728 89
1.0 50 0.598 0.801 0.583 0.660 0.499 0.629 0.734 0.553 0.479 0.747 89
100 0.656 0.808 0.586 0.666 0.542 0.633 0.737 0.559 0.491 0.749 89
400 0.670 0.808 0.586 0.666 0.559 0.634 0.735 0.575 0.491 0.750 89
2.0 50 0.587 0.799 0.591 0.663 0.488 0.626 0.743 0.559 0.479 0.751 89
100 0.639 0.805 0.594 0.669 0.531 0.629 0.746 0.564 0.492 0.754 89
400 0.662 0.807 0.596 0.672 0.551 0.631 0.746 0.581 0.496 0.754 89
11025 32 2 0.5 50 0.490 0.729 0.541 0.607 0.427 0.582 0.696 0.514 0.430 0.717 89
100 0.575 0.742 0.550 0.618 0.488 0.592 0.703 0.520 0.451 0.725 89
400 0.606 0.742 0.547 0.619 0.515 0.594 0.700 0.531 0.452 0.725 89
1.0 50 0.511 0.778 0.556 0.629 0.439 0.613 0.715 0.536 0.451 0.736 89
100 0.610 0.797 0.564 0.643 0.502 0.623 0.723 0.547 0.474 0.742 89
400 0.647 0.799 0.563 0.646 0.533 0.624 0.719 0.559 0.476 0.741 89
2.0 50 0.488 0.761 0.551 0.626 0.403 0.566 0.709 0.508 0.446 0.716 89
100 0.574 0.776 0.561 0.638 0.461 0.577 0.719 0.514 0.469 0.726 89
400 0.615 0.777 0.561 0.642 0.493 0.577 0.716 0.525 0.471 0.724 89
4 0.5 50 0.490 0.729 0.541 0.607 0.427 0.582 0.696 0.514 0.430 0.717 89
100 0.575 0.742 0.550 0.618 0.488 0.592 0.703 0.520 0.451 0.725 89
400 0.606 0.742 0.547 0.619 0.515 0.594 0.700 0.531 0.452 0.725 89
1.0 50 0.511 0.778 0.556 0.629 0.439 0.613 0.715 0.536 0.451 0.736 89
100 0.610 0.797 0.564 0.643 0.502 0.623 0.723 0.547 0.474 0.742 89
400 0.647 0.799 0.563 0.646 0.533 0.624 0.719 0.559 0.476 0.741 89
2.0 50 0.488 0.761 0.551 0.626 0.403 0.566 0.709 0.508 0.446 0.716 89
100 0.574 0.776 0.561 0.638 0.461 0.577 0.719 0.514 0.469 0.726 89
400 0.615 0.777 0.561 0.642 0.493 0.577 0.716 0.525 0.471 0.724 89
8 0.5 50 0.490 0.729 0.541 0.607 0.427 0.582 0.696 0.514 0.430 0.717 89
100 0.575 0.742 0.550 0.618 0.488 0.592 0.703 0.520 0.451 0.725 89
400 0.606 0.742 0.547 0.619 0.515 0.594 0.700 0.531 0.452 0.725 89
1.0 50 0.511 0.778 0.556 0.629 0.439 0.613 0.715 0.536 0.451 0.736 89
100 0.610 0.797 0.564 0.643 0.502 0.623 0.723 0.547 0.474 0.742 89
400 0.647 0.799 0.563 0.646 0.533 0.624 0.719 0.559 0.476 0.741 89
2.0 50 0.488 0.761 0.551 0.626 0.403 0.566 0.709 0.508 0.446 0.716 89
100 0.574 0.776 0.561 0.638 0.461 0.577 0.719 0.514 0.469 0.726 89
400 0.615 0.777 0.561 0.642 0.493 0.577 0.716 0.525 0.471 0.724 89
64 2 0.5 50 0.525 0.734 0.559 0.619 0.456 0.593 0.710 0.514 0.442 0.729 89
100 0.587 0.741 0.562 0.626 0.499 0.597 0.713 0.520 0.457 0.732 89
400 0.609 0.735 0.557 0.622 0.525 0.596 0.706 0.536 0.455 0.729 89
1.0 50 0.566 0.793 0.572 0.645 0.481 0.634 0.730 0.553 0.468 0.748 89
100 0.628 0.803 0.578 0.653 0.525 0.641 0.735 0.559 0.484 0.754 89
400 0.654 0.801 0.575 0.652 0.550 0.638 0.729 0.575 0.484 0.750 89
2.0 50 0.546 0.782 0.574 0.645 0.452 0.599 0.732 0.536 0.465 0.740 89
100 0.603 0.790 0.579 0.652 0.493 0.605 0.737 0.536 0.482 0.745 89
400 0.636 0.792 0.579 0.654 0.524 0.604 0.734 0.553 0.485 0.742 89
4 0.5 50 0.525 0.734 0.559 0.619 0.456 0.593 0.710 0.514 0.442 0.729 89
100 0.587 0.741 0.562 0.626 0.499 0.597 0.713 0.520 0.457 0.732 89
400 0.609 0.735 0.557 0.622 0.525 0.596 0.706 0.536 0.455 0.729 89
1.0 50 0.566 0.793 0.572 0.645 0.481 0.634 0.730 0.553 0.468 0.748 89
100 0.628 0.803 0.578 0.653 0.525 0.641 0.735 0.559 0.484 0.754 89
400 0.654 0.801 0.575 0.652 0.550 0.638 0.729 0.575 0.484 0.750 89
2.0 50 0.546 0.782 0.574 0.645 0.452 0.599 0.732 0.536 0.465 0.740 89
100 0.603 0.790 0.579 0.652 0.493 0.605 0.737 0.536 0.482 0.745 89
400 0.636 0.792 0.579 0.654 0.524 0.604 0.734 0.553 0.485 0.742 89
8 0.5 50 0.525 0.734 0.559 0.619 0.456 0.593 0.710 0.514 0.442 0.729 89
100 0.587 0.741 0.562 0.626 0.499 0.597 0.713 0.520 0.457 0.732 89
400 0.609 0.735 0.557 0.622 0.525 0.596 0.706 0.536 0.455 0.729 89
1.0 50 0.566 0.793 0.572 0.645 0.481 0.634 0.730 0.553 0.468 0.748 89
100 0.628 0.803 0.578 0.653 0.525 0.641 0.735 0.559 0.484 0.754 89
400 0.654 0.801 0.575 0.652 0.550 0.638 0.729 0.575 0.484 0.750 89
2.0 50 0.546 0.782 0.574 0.645 0.452 0.599 0.732 0.536 0.465 0.740 89
100 0.603 0.790 0.579 0.652 0.493 0.605 0.737 0.536 0.482 0.745 89
400 0.636 0.792 0.579 0.654 0.524 0.604 0.734 0.553 0.485 0.742 89
128 2 0.5 50 0.539 0.728 0.567 0.624 0.469 0.594 0.713 0.514 0.446 0.732 89
100 0.593 0.730 0.568 0.628 0.510 0.595 0.712 0.525 0.457 0.732 89
400 0.615 0.725 0.565 0.625 0.538 0.597 0.709 0.542 0.456 0.733 89
1.0 50 0.590 0.800 0.581 0.658 0.492 0.628 0.733 0.547 0.476 0.746 89
100 0.648 0.806 0.584 0.664 0.535 0.631 0.735 0.559 0.488 0.748 89
400 0.679 0.807 0.585 0.665 0.563 0.634 0.734 0.575 0.491 0.750 89
2.0 50 0.578 0.804 0.588 0.662 0.478 0.622 0.741 0.553 0.477 0.750 89
100 0.630 0.808 0.591 0.668 0.518 0.624 0.742 0.553 0.489 0.751 89
400 0.665 0.810 0.593 0.671 0.550 0.626 0.743 0.570 0.493 0.752 89
4 0.5 50 0.539 0.728 0.567 0.624 0.469 0.594 0.713 0.514 0.446 0.732 89
100 0.593 0.730 0.568 0.628 0.510 0.595 0.712 0.525 0.457 0.732 89
400 0.615 0.725 0.565 0.625 0.538 0.597 0.709 0.542 0.456 0.733 89
1.0 50 0.590 0.800 0.581 0.658 0.492 0.628 0.733 0.547 0.476 0.746 89
100 0.648 0.806 0.584 0.664 0.535 0.631 0.735 0.559 0.488 0.748 89
400 0.679 0.807 0.585 0.665 0.563 0.634 0.734 0.575 0.491 0.750 89
2.0 50 0.578 0.804 0.588 0.662 0.478 0.622 0.741 0.553 0.477 0.750 89
100 0.630 0.808 0.591 0.668 0.518 0.624 0.742 0.553 0.489 0.751 89
400 0.665 0.810 0.593 0.671 0.550 0.626 0.743 0.570 0.493 0.752 89
8 0.5 50 0.539 0.728 0.567 0.624 0.469 0.594 0.713 0.514 0.446 0.732 89
100 0.593 0.730 0.568 0.628 0.510 0.595 0.712 0.525 0.457 0.732 89
400 0.615 0.725 0.565 0.625 0.538 0.597 0.709 0.542 0.456 0.733 89
1.0 50 0.590 0.800 0.581 0.658 0.492 0.628 0.733 0.547 0.476 0.746 89
100 0.648 0.806 0.584 0.664 0.535 0.631 0.735 0.559 0.488 0.748 89
400 0.679 0.807 0.585 0.665 0.563 0.634 0.734 0.575 0.491 0.750 89
2.0 50 0.578 0.804 0.588 0.662 0.478 0.622 0.741 0.553 0.477 0.750 89
100 0.630 0.808 0.591 0.668 0.518 0.624 0.742 0.553 0.489 0.751 89
400 0.665 0.810 0.593 0.671 0.550 0.626 0.743 0.570 0.493 0.752 89
median 8000 32 2 0.5 50 0.487 0.750 0.534 0.598 0.436 0.615 0.700 0.508 0.435 0.734 89
100 0.590 0.768 0.542 0.612 0.507 0.625 0.709 0.542 0.460 0.740 89
400 0.617 0.771 0.541 0.617 0.526 0.624 0.704 0.553 0.463 0.736 89
1.0 50 0.493 0.769 0.543 0.612 0.424 0.604 0.712 0.508 0.443 0.738 89
100 0.583 0.783 0.552 0.623 0.486 0.615 0.722 0.536 0.466 0.746 89
400 0.622 0.786 0.555 0.628 0.516 0.617 0.721 0.553 0.472 0.744 89
2.0 50 0.490 0.761 0.527 0.600 0.402 0.563 0.692 0.475 0.442 0.715 89
100 0.582 0.775 0.535 0.611 0.454 0.571 0.701 0.497 0.465 0.721 89
400 0.629 0.782 0.538 0.618 0.482 0.573 0.701 0.508 0.475 0.720 89
4 0.5 50 0.487 0.750 0.534 0.598 0.436 0.615 0.700 0.508 0.435 0.734 89
100 0.590 0.768 0.542 0.612 0.507 0.625 0.709 0.542 0.460 0.740 89
400 0.617 0.771 0.541 0.617 0.526 0.624 0.704 0.553 0.463 0.736 89
1.0 50 0.493 0.769 0.543 0.612 0.424 0.604 0.712 0.508 0.443 0.738 89
100 0.583 0.783 0.552 0.623 0.486 0.615 0.722 0.536 0.466 0.746 89
400 0.622 0.786 0.555 0.628 0.516 0.617 0.721 0.553 0.472 0.744 89
2.0 50 0.490 0.761 0.527 0.600 0.402 0.563 0.692 0.475 0.442 0.715 89
100 0.582 0.775 0.535 0.611 0.454 0.571 0.701 0.497 0.465 0.721 89
400 0.629 0.782 0.538 0.618 0.482 0.573 0.701 0.508 0.475 0.720 89
8 0.5 50 0.487 0.750 0.534 0.598 0.436 0.615 0.700 0.508 0.435 0.734 89
100 0.590 0.768 0.542 0.612 0.507 0.625 0.709 0.542 0.460 0.740 89
400 0.617 0.771 0.541 0.617 0.526 0.624 0.704 0.553 0.463 0.736 89
1.0 50 0.493 0.769 0.543 0.612 0.424 0.604 0.712 0.508 0.443 0.738 89
100 0.583 0.783 0.552 0.623 0.486 0.615 0.722 0.536 0.466 0.746 89
400 0.622 0.786 0.555 0.628 0.516 0.617 0.721 0.553 0.472 0.744 89
2.0 50 0.490 0.761 0.527 0.600 0.402 0.563 0.692 0.475 0.442 0.715 89
100 0.582 0.775 0.535 0.611 0.454 0.571 0.701 0.497 0.465 0.721 89
400 0.629 0.782 0.538 0.618 0.482 0.573 0.701 0.508 0.475 0.720 89
64 2 0.5 50 0.546 0.780 0.555 0.623 0.476 0.633 0.717 0.536 0.461 0.747 89
100 0.619 0.793 0.561 0.633 0.528 0.642 0.724 0.553 0.481 0.753 89
400 0.642 0.794 0.558 0.635 0.542 0.639 0.718 0.553 0.481 0.748 89
1.0 50 0.560 0.794 0.563 0.633 0.476 0.635 0.730 0.553 0.470 0.755 89
100 0.624 0.805 0.569 0.642 0.519 0.642 0.737 0.564 0.488 0.760 89
400 0.653 0.806 0.569 0.646 0.538 0.640 0.733 0.564 0.491 0.755 89
2.0 50 0.535 0.774 0.546 0.623 0.430 0.572 0.709 0.492 0.466 0.724 89
100 0.609 0.784 0.551 0.631 0.466 0.576 0.713 0.503 0.484 0.726 89
400 0.650 0.788 0.553 0.637 0.490 0.574 0.711 0.503 0.489 0.724 89
4 0.5 50 0.546 0.780 0.555 0.623 0.476 0.633 0.717 0.536 0.461 0.747 89
100 0.619 0.793 0.561 0.633 0.528 0.642 0.724 0.553 0.481 0.753 89
400 0.642 0.794 0.558 0.635 0.542 0.639 0.718 0.553 0.481 0.748 89
1.0 50 0.560 0.794 0.563 0.633 0.476 0.635 0.730 0.553 0.470 0.755 89
100 0.624 0.805 0.569 0.642 0.519 0.642 0.737 0.564 0.488 0.760 89
400 0.653 0.806 0.569 0.646 0.538 0.640 0.733 0.564 0.491 0.755 89
2.0 50 0.535 0.774 0.546 0.623 0.430 0.572 0.709 0.492 0.466 0.724 89
100 0.609 0.784 0.551 0.631 0.466 0.576 0.713 0.503 0.484 0.726 89
400 0.650 0.788 0.553 0.637 0.490 0.574 0.711 0.503 0.489 0.724 89
8 0.5 50 0.546 0.780 0.555 0.623 0.476 0.633 0.717 0.536 0.461 0.747 89
100 0.619 0.793 0.561 0.633 0.528 0.642 0.724 0.553 0.481 0.753 89
400 0.642 0.794 0.558 0.635 0.542 0.639 0.718 0.553 0.481 0.748 89
1.0 50 0.560 0.794 0.563 0.633 0.476 0.635 0.730 0.553 0.470 0.755 89
100 0.624 0.805 0.569 0.642 0.519 0.642 0.737 0.564 0.488 0.760 89
400 0.653 0.806 0.569 0.646 0.538 0.640 0.733 0.564 0.491 0.755 89
2.0 50 0.535 0.774 0.546 0.623 0.430 0.572 0.709 0.492 0.466 0.724 89
100 0.609 0.784 0.551 0.631 0.466 0.576 0.713 0.503 0.484 0.726 89
400 0.650 0.788 0.553 0.637 0.490 0.574 0.711 0.503 0.489 0.724 89
128 2 0.5 50 0.586 0.804 0.568 0.646 0.496 0.641 0.727 0.547 0.480 0.752 89
100 0.645 0.812 0.569 0.650 0.534 0.645 0.727 0.553 0.493 0.754 89
400 0.668 0.811 0.569 0.652 0.554 0.646 0.725 0.564 0.495 0.753 89
1.0 50 0.587 0.806 0.580 0.653 0.487 0.639 0.741 0.553 0.483 0.761 89
100 0.635 0.812 0.582 0.656 0.524 0.642 0.742 0.559 0.493 0.762 89
400 0.659 0.813 0.583 0.659 0.545 0.643 0.740 0.570 0.497 0.761 89
2.0 50 0.558 0.780 0.561 0.639 0.439 0.576 0.718 0.497 0.478 0.728 89
100 0.622 0.787 0.564 0.645 0.474 0.578 0.721 0.503 0.492 0.730 89
400 0.654 0.789 0.566 0.649 0.499 0.581 0.722 0.520 0.498 0.731 89
4 0.5 50 0.586 0.804 0.568 0.646 0.496 0.641 0.727 0.547 0.480 0.752 89
100 0.645 0.812 0.569 0.650 0.534 0.645 0.727 0.553 0.493 0.754 89
400 0.668 0.811 0.569 0.652 0.554 0.646 0.725 0.564 0.495 0.753 89
1.0 50 0.587 0.806 0.580 0.653 0.487 0.639 0.741 0.553 0.483 0.761 89
100 0.635 0.812 0.582 0.656 0.524 0.642 0.742 0.559 0.493 0.762 89
400 0.659 0.813 0.583 0.659 0.545 0.643 0.740 0.570 0.497 0.761 89
2.0 50 0.558 0.780 0.561 0.639 0.439 0.576 0.718 0.497 0.478 0.728 89
100 0.622 0.787 0.564 0.645 0.474 0.578 0.721 0.503 0.492 0.730 89
400 0.654 0.789 0.566 0.649 0.499 0.581 0.722 0.520 0.498 0.731 89
8 0.5 50 0.586 0.804 0.568 0.646 0.496 0.641 0.727 0.547 0.480 0.752 89
100 0.645 0.812 0.569 0.650 0.534 0.645 0.727 0.553 0.493 0.754 89
400 0.668 0.811 0.569 0.652 0.554 0.646 0.725 0.564 0.495 0.753 89
1.0 50 0.587 0.806 0.580 0.653 0.487 0.639 0.741 0.553 0.483 0.761 89
100 0.635 0.812 0.582 0.656 0.524 0.642 0.742 0.559 0.493 0.762 89
400 0.659 0.813 0.583 0.659 0.545 0.643 0.740 0.570 0.497 0.761 89
2.0 50 0.558 0.780 0.561 0.639 0.439 0.576 0.718 0.497 0.478 0.728 89
100 0.622 0.787 0.564 0.645 0.474 0.578 0.721 0.503 0.492 0.730 89
400 0.654 0.789 0.566 0.649 0.499 0.581 0.722 0.520 0.498 0.731 89
11025 32 2 0.5 50 0.487 0.756 0.536 0.606 0.426 0.607 0.700 0.520 0.438 0.731 89
100 0.594 0.774 0.545 0.620 0.503 0.617 0.709 0.542 0.462 0.738 89
400 0.617 0.774 0.544 0.621 0.521 0.618 0.706 0.547 0.463 0.736 89
1.0 50 0.492 0.768 0.546 0.615 0.417 0.603 0.711 0.531 0.443 0.737 89
100 0.591 0.784 0.555 0.629 0.487 0.612 0.721 0.542 0.467 0.744 89
400 0.623 0.782 0.555 0.630 0.513 0.614 0.718 0.547 0.470 0.742 89
2.0 50 0.477 0.756 0.528 0.603 0.384 0.551 0.692 0.486 0.443 0.710 89
100 0.571 0.771 0.537 0.616 0.441 0.558 0.702 0.492 0.466 0.716 89
400 0.624 0.774 0.539 0.620 0.476 0.561 0.701 0.497 0.473 0.716 89
4 0.5 50 0.487 0.756 0.536 0.606 0.426 0.607 0.700 0.520 0.438 0.731 89
100 0.594 0.774 0.545 0.620 0.503 0.617 0.709 0.542 0.462 0.738 89
400 0.617 0.774 0.544 0.621 0.521 0.618 0.706 0.547 0.463 0.736 89
1.0 50 0.492 0.768 0.546 0.615 0.417 0.603 0.711 0.531 0.443 0.737 89
100 0.591 0.784 0.555 0.629 0.487 0.612 0.721 0.542 0.467 0.744 89
400 0.623 0.782 0.555 0.630 0.513 0.614 0.718 0.547 0.470 0.742 89
2.0 50 0.477 0.756 0.528 0.603 0.384 0.551 0.692 0.486 0.443 0.710 89
100 0.571 0.771 0.537 0.616 0.441 0.558 0.702 0.492 0.466 0.716 89
400 0.624 0.774 0.539 0.620 0.476 0.561 0.701 0.497 0.473 0.716 89
8 0.5 50 0.487 0.756 0.536 0.606 0.426 0.607 0.700 0.520 0.438 0.731 89
100 0.594 0.774 0.545 0.620 0.503 0.617 0.709 0.542 0.462 0.738 89
400 0.617 0.774 0.544 0.621 0.521 0.618 0.706 0.547 0.463 0.736 89
1.0 50 0.492 0.768 0.546 0.615 0.417 0.603 0.711 0.531 0.443 0.737 89
100 0.591 0.784 0.555 0.629 0.487 0.612 0.721 0.542 0.467 0.744 89
400 0.623 0.782 0.555 0.630 0.513 0.614 0.718 0.547 0.470 0.742 89
2.0 50 0.477 0.756 0.528 0.603 0.384 0.551 0.692 0.486 0.443 0.710 89
100 0.571 0.771 0.537 0.616 0.441 0.558 0.702 0.492 0.466 0.716 89
400 0.624 0.774 0.539 0.620 0.476 0.561 0.701 0.497 0.473 0.716 89
64 2 0.5 50 0.544 0.791 0.551 0.627 0.468 0.631 0.714 0.542 0.464 0.743 89
100 0.627 0.802 0.556 0.636 0.523 0.638 0.720 0.553 0.481 0.748 89
400 0.649 0.803 0.555 0.637 0.539 0.638 0.716 0.559 0.484 0.746 89
1.0 50 0.547 0.794 0.563 0.635 0.458 0.628 0.728 0.553 0.467 0.752 89
100 0.616 0.802 0.567 0.641 0.508 0.634 0.733 0.559 0.481 0.755 89
400 0.646 0.806 0.568 0.645 0.532 0.635 0.731 0.564 0.488 0.754 89
2.0 50 0.529 0.771 0.545 0.621 0.426 0.572 0.706 0.497 0.463 0.722 89
100 0.609 0.780 0.550 0.628 0.469 0.576 0.710 0.503 0.480 0.725 89
400 0.646 0.785 0.553 0.634 0.496 0.578 0.712 0.514 0.489 0.726 89
4 0.5 50 0.544 0.791 0.551 0.627 0.468 0.631 0.714 0.542 0.464 0.743 89
100 0.627 0.802 0.556 0.636 0.523 0.638 0.720 0.553 0.481 0.748 89
400 0.649 0.803 0.555 0.637 0.539 0.638 0.716 0.559 0.484 0.746 89
1.0 50 0.547 0.794 0.563 0.635 0.458 0.628 0.728 0.553 0.467 0.752 89
100 0.616 0.802 0.567 0.641 0.508 0.634 0.733 0.559 0.481 0.755 89
400 0.646 0.806 0.568 0.645 0.532 0.635 0.731 0.564 0.488 0.754 89
2.0 50 0.529 0.771 0.545 0.621 0.426 0.572 0.706 0.497 0.463 0.722 89
100 0.609 0.780 0.550 0.628 0.469 0.576 0.710 0.503 0.480 0.725 89
400 0.646 0.785 0.553 0.634 0.496 0.578 0.712 0.514 0.489 0.726 89
8 0.5 50 0.544 0.791 0.551 0.627 0.468 0.631 0.714 0.542 0.464 0.743 89
100 0.627 0.802 0.556 0.636 0.523 0.638 0.720 0.553 0.481 0.748 89
400 0.649 0.803 0.555 0.637 0.539 0.638 0.716 0.559 0.484 0.746 89
1.0 50 0.547 0.794 0.563 0.635 0.458 0.628 0.728 0.553 0.467 0.752 89
100 0.616 0.802 0.567 0.641 0.508 0.634 0.733 0.559 0.481 0.755 89
400 0.646 0.806 0.568 0.645 0.532 0.635 0.731 0.564 0.488 0.754 89
2.0 50 0.529 0.771 0.545 0.621 0.426 0.572 0.706 0.497 0.463 0.722 89
100 0.609 0.780 0.550 0.628 0.469 0.576 0.710 0.503 0.480 0.725 89
400 0.646 0.785 0.553 0.634 0.496 0.578 0.712 0.514 0.489 0.726 89
128 2 0.5 50 0.582 0.801 0.565 0.642 0.493 0.643 0.724 0.553 0.477 0.750 89
100 0.645 0.812 0.570 0.650 0.534 0.650 0.729 0.559 0.492 0.756 89
400 0.677 0.813 0.570 0.652 0.564 0.651 0.727 0.570 0.495 0.755 89
1.0 50 0.570 0.801 0.570 0.648 0.471 0.630 0.731 0.553 0.477 0.751 89
100 0.630 0.810 0.575 0.654 0.511 0.636 0.735 0.553 0.491 0.756 89
400 0.663 0.811 0.576 0.657 0.544 0.637 0.734 0.564 0.496 0.754 89
2.0 50 0.551 0.779 0.557 0.635 0.436 0.581 0.715 0.503 0.474 0.729 89
100 0.620 0.786 0.562 0.641 0.475 0.584 0.719 0.503 0.489 0.733 89
400 0.662 0.789 0.565 0.646 0.512 0.587 0.720 0.520 0.494 0.733 89
4 0.5 50 0.582 0.801 0.565 0.642 0.493 0.643 0.724 0.553 0.477 0.750 89
100 0.645 0.812 0.570 0.650 0.534 0.650 0.729 0.559 0.492 0.756 89
400 0.677 0.813 0.570 0.652 0.564 0.651 0.727 0.570 0.495 0.755 89
1.0 50 0.570 0.801 0.570 0.648 0.471 0.630 0.731 0.553 0.477 0.751 89
100 0.630 0.810 0.575 0.654 0.511 0.636 0.735 0.553 0.491 0.756 89
400 0.663 0.811 0.576 0.657 0.544 0.637 0.734 0.564 0.496 0.754 89
2.0 50 0.551 0.779 0.557 0.635 0.436 0.581 0.715 0.503 0.474 0.729 89
100 0.620 0.786 0.562 0.641 0.475 0.584 0.719 0.503 0.489 0.733 89
400 0.662 0.789 0.565 0.646 0.512 0.587 0.720 0.520 0.494 0.733 89
8 0.5 50 0.582 0.801 0.565 0.642 0.493 0.643 0.724 0.553 0.477 0.750 89
100 0.645 0.812 0.570 0.650 0.534 0.650 0.729 0.559 0.492 0.756 89
400 0.677 0.813 0.570 0.652 0.564 0.651 0.727 0.570 0.495 0.755 89
1.0 50 0.570 0.801 0.570 0.648 0.471 0.630 0.731 0.553 0.477 0.751 89
100 0.630 0.810 0.575 0.654 0.511 0.636 0.735 0.553 0.491 0.756 89
400 0.663 0.811 0.576 0.657 0.544 0.637 0.734 0.564 0.496 0.754 89
2.0 50 0.551 0.779 0.557 0.635 0.436 0.581 0.715 0.503 0.474 0.729 89
100 0.620 0.786 0.562 0.641 0.475 0.584 0.719 0.503 0.489 0.733 89
400 0.662 0.789 0.565 0.646 0.512 0.587 0.720 0.520 0.494 0.733 89

In [26]:
best_igain_b = beatles_scores['Information gain'].argmax()
best_fmeas_b = beatles_scores['F-measure'].argmax()
best_amlt_b = beatles_scores['Any Metric Level Total'].argmax()
best_cmlt_b = beatles_scores['Correct Metric Level Total'].argmax()

In [27]:
print best_igain
print best_fmeas
print best_amlt
print best_cmlt
print
print best_igain_b
print best_fmeas_b
print best_amlt_b
print best_cmlt_b


(u'median', 8000, 128, 8, 2.0, 100)
(u'mean', 8000, 128, 2, 2.0, 50)
(u'median', 8000, 128, 8, 1.0, 50)
(u'median', 8000, 128, 2, 1.0, 100)

(u'median', 8000, 128, 2, 2.0, 400)
(u'mean', 8000, 128, 2, 2.0, 100)
(u'median', 8000, 128, 2, 1.0, 400)
(u'median', 11025, 128, 2, 0.5, 400)

In [28]:
good_scores = ['Any Metric Level Total', 'Information gain', 'F-measure', 'Correct Metric Level Total']

In [29]:
smc_scores.loc[[best_igain, best_fmeas, best_amlt]][good_scores]


Out[29]:
Any Metric Level Total Information gain F-measure Correct Metric Level Total
aggregate fmax n_mels ac_size std_bpm tightness
median 8000 128 8 2 100 0.316 0.176 0.353 0.172
mean 8000 128 2 2 50 0.315 0.164 0.366 0.138
median 8000 128 8 1 50 0.334 0.174 0.361 0.172

In [30]:
smc_scores.loc[[best_igain_b, best_fmeas_b, best_amlt_b, best_cmlt_b]][good_scores]


Out[30]:
Any Metric Level Total Information gain F-measure Correct Metric Level Total
aggregate fmax n_mels ac_size std_bpm tightness
median 8000 128 2 2.0 400 0.298 0.161 0.326 0.155
mean 8000 128 2 2.0 100 0.312 0.164 0.357 0.145
median 8000 128 2 1.0 400 0.301 0.160 0.329 0.161
11025 128 2 0.5 400 0.264 0.147 0.306 0.124

In [31]:
beatles_scores.loc[[best_igain, best_fmeas, best_amlt, best_cmlt]][good_scores]


Out[31]:
Any Metric Level Total Information gain F-measure Correct Metric Level Total
aggregate fmax n_mels ac_size std_bpm tightness
median 8000 128 8 2 100 0.787 0.492 0.721 0.578
mean 8000 128 2 2 50 0.799 0.479 0.743 0.626
median 8000 128 8 1 50 0.806 0.483 0.741 0.639
2 1 100 0.812 0.493 0.742 0.642

In [32]:
beatles_scores.loc[[best_igain_b, best_fmeas_b, best_amlt_b, best_cmlt_b]][good_scores]


Out[32]:
Any Metric Level Total Information gain F-measure Correct Metric Level Total
aggregate fmax n_mels ac_size std_bpm tightness
median 8000 128 2 2.0 400 0.789 0.498 0.722 0.581
mean 8000 128 2 2.0 100 0.805 0.492 0.746 0.629
median 8000 128 2 1.0 400 0.813 0.497 0.740 0.643
11025 128 2 0.5 400 0.813 0.495 0.727 0.651

In [37]:
beatles_results['fmax'].unique()


Out[37]:
array([ 8000, 11025])

In [33]:
smc_scores.loc[[('mean', 11025, 128, 4, 1.0, 400),
                best_amlt,
                best_amlt_b,
                best_cmlt,
                best_cmlt_b,
               ('median', 8000, 128, 4, 1.0, 100),]][good_scores]


Out[33]:
Any Metric Level Total Information gain F-measure Correct Metric Level Total
aggregate fmax n_mels ac_size std_bpm tightness
mean 11025 128 4 1.0 400 0.282 0.146 0.313 0.109
median 8000 128 8 1.0 50 0.334 0.174 0.361 0.172
2 1.0 400 0.301 0.160 0.329 0.161
100 0.328 0.172 0.356 0.177
11025 128 2 0.5 400 0.264 0.147 0.306 0.124
8000 128 4 1.0 100 0.329 0.172 0.356 0.177

In [35]:
beatles_scores.loc[[(u'mean', 11025.0, 128, 4, 1.0, 400),
                    best_amlt,
                    best_amlt_b,
                    best_cmlt,
                    best_cmlt_b,
                   ('median', 8000, 128, 4, 1.0, 100),]][good_scores]


Out[35]:
Any Metric Level Total Information gain F-measure Correct Metric Level Total
aggregate fmax n_mels ac_size std_bpm tightness
mean 11025 128 4 1.0 400 0.807 0.491 0.734 0.634
median 8000 128 8 1.0 50 0.806 0.483 0.741 0.639
2 1.0 400 0.813 0.497 0.740 0.643
100 0.812 0.493 0.742 0.642
11025 128 2 0.5 400 0.813 0.495 0.727 0.651
8000 128 4 1.0 100 0.812 0.493 0.742 0.642

In [36]:
best_igain_b


Out[36]:
(u'median', 8000, 128, 2, 2.0, 400)

In [37]:
all_results = pd.concat([smc_results, beatles_results])

In [38]:
all_scores = all_results.groupby(['aggregate', 'fmax', 'n_mels', 'ac_size', 'std_bpm', 'tightness']).mean()

In [39]:
best_igain_a = all_scores['Information gain'].argmax()
best_fmeas_a = all_scores['F-measure'].argmax()
best_amlt_a = all_scores['Any Metric Level Total'].argmax()
best_cmlt_a = all_scores['Correct Metric Level Total'].argmax()

In [40]:
all_scores.loc[[(u'mean', 11025.0, 128, 4, 1.0, 400),
                    best_cmlt,
                    best_cmlt_b,
                    best_cmlt_a,
               ('median', 8000, 128, 4, 1.0, 100),]]


Out[40]:
Any Metric Level Continuous Any Metric Level Total Cemgil Cemgil Best Metric Level Correct Metric Level Continuous Correct Metric Level Total F-measure Goto Information gain P-score index
aggregate fmax n_mels ac_size std_bpm tightness
mean 11025 128 4 1.0 400 0.385 0.519 0.381 0.455 0.292 0.346 0.504 0.295 0.302 0.586 99.412
median 8000 128 2 1.0 100 0.376 0.547 0.395 0.461 0.295 0.387 0.530 0.298 0.317 0.615 99.412
11025 128 2 0.5 400 0.377 0.512 0.371 0.443 0.295 0.362 0.496 0.295 0.304 0.590 99.412
8000 128 2 1.0 100 0.376 0.547 0.395 0.461 0.295 0.387 0.530 0.298 0.317 0.615 99.412
4 1.0 100 0.377 0.547 0.395 0.461 0.295 0.387 0.530 0.298 0.317 0.615 99.412