<jupyter_start><jupyter_text>Baseline Results<jupyter_code>baseline = [23.0, 27.7, 25.1]<jupyter_output><empty_output><jupyter_text>Results Piano<jupyter_code>sdr_piano = np.asarray([12.058522,
                        22.586641,
                        23.827044,
                        23.2991,
                        23.338349,
                        23.207559,
                        23.173699,
                        23.236641
                        ])
sir_piano = np.asarray([19.87783,
                        26.992552,
                        28.40466,
                        28.581412,
                        29.519087,
                        29.639245,
                        29.622971,
                        29.647146
                        ])
sar_piano = np.asarray([13.900278,
                        24.687258,
                        26.008207,
                        24.935241,
                        24.620366,
                        24.358077,
                        24.31974,
                        24.396088
                        ])
rmse_piano = np.asarray([0.018822578691837,
                         0.009151183532551,
                         0.006448068438334,
                         0.005213510490695,
                         0.004402994479973,
                         0.003911156558985,
                         0.00387314053362,
                         0.003862956640373
                         ])<jupyter_output><empty_output><jupyter_text>Results Guitar<jupyter_code>sdr_guitar = np.asarray([9.764678,
                        19.820464,
                        17.253289,
                        16.040234,
                        17.85299,
                        17.196387,
                        17.59101,
                        17.548121
                        ])
sir_guitar = np.asarray([18.2577,
                         27.287366,
                         24.790741,
                         25.350818,
                         25.870809,
                         25.102915,
                         25.946982,
                         25.892149
                         ])
sar_guitar = np.asarray([12.12962,
                         25.129986,
                         18.157653,
                         17.660581,
                         18.740529,
                         18.239914,
                         18.438821,
                         18.402411
                         ])
rmse_guitar = np.asarray([0.023717421895489,
                          0.019611284384463,
                          0.014766040800127,
                          0.012068490455038,
                          0.008317047287547,
                          0.006637697043936,
                          0.005709067593406,
                          0.005703783399623
                          ])<jupyter_output><empty_output><jupyter_text>Results Clarinet<jupyter_code>sdr_clarinet = np.asarray([8.16965,
                           31.715348,
                           31.769391,
                           31.699752,
                           31.852994,
                           31.6015,
                           31.513526,
                           31.425823
                           ])
sir_clarinet = np.asarray([11.06486,
                           36.909515,
                           36.02645,
                           36.38224,
                           38.440206,
                           38.81362,
                           38.721868,
                           38.420911
                           ])
sar_clarinet = np.asarray([17.841908,
                           33.854822,
                           35.663342,
                           33.734954,
                           33.045458,
                           32.650432,
                           32.569279,
                           32.498521
                           ])
rmse_clarinet = np.asarray([0.058763526362253,
                            0.025932666749413,
                            0.01217313975905,
                            0.006508373687873,
                            0.00517000286557,
                            0.004477268356774,
                            0.004352094050076,
                            0.004364904349632
                            ])<jupyter_output><empty_output><jupyter_text>Average results<jupyter_code>sdr_average = np.asarray([9.99761666666667,
                          24.7074843333333,
                          24.2832413333333,
                          23.6796953333333,
                          24.348111,
                          24.0018153333333,
                          24.092745,
                          24.070195
                          ])
sir_average = np.asarray([16.40013,
                          30.3964776666667,
                          29.740617,
                          30.1048233333333,
                          31.2767006666667,
                          31.18526,
                          31.430607,
                          31.3200686666667
                          ])
sar_average = np.asarray([14.6239353333333,
                          27.8906886666667,
                          26.609734,
                          25.443592,
                          25.4687843333333,
                          25.0828076666667,
                          25.10928,
                          25.0990066666667
                          ])
rmse_average = np.asarray([0.033767842316526,
                           0.018231711555476,
                           0.01112908299917,
                           0.007930124877869,
                           0.00596334821103,
                           0.005008707319898,
                           0.004644767392368,
                           0.004643881463209
                           ])<jupyter_output><empty_output><jupyter_text>Generate plots<jupyter_code>x = np.asarray([1, 2, 3, 5, 7, 10, 15, 20])
d_piano = Data(x=x, 
               sdr=sdr_piano, 
               sir=sir_piano, 
               sar=sar_piano, 
               rmse=rmse_piano, 
               baseline=baseline)

d_guitar = Data(x=x, 
                sdr=sdr_guitar, 
                sir=sir_guitar, 
                sar=sar_guitar, 
                rmse=rmse_guitar, 
                baseline=baseline)

d_clarinet = Data(x=x, 
                  sdr=sdr_clarinet, 
                  sir=sir_clarinet, 
                  sar=sar_clarinet, 
                  rmse=rmse_clarinet, 
                  baseline=baseline)
def plot_metric(x, metric, baseline, ylabel, pbaseline=True, legend=True):
    lw = 2
    plt.plot(x, metric, "k-s", markerfacecolor="w", lw=lw)
    if pbaseline:
        plt.plot(x, baseline[0] + 0*x, "k--", lw=lw)
        plt.plot(x, baseline[1] + 0*x, "k-.", lw=lw)
        plt.plot(x, baseline[2] + 0*x, "k:", lw=lw)
    plt.ylabel(ylabel)
    #plt.ylabel("dB")
    plt.xlabel("D")
    plt.xticks(x)
    if legend:
        plt.legend(['SSGP', 'LD-PSDTF', "IS-NMF", "KL-NMF"], frameon=1, ncol=1)
plt.rcParams.update({'font.size': 10})

all_rmse = [d_piano.rmse, d_guitar.rmse, d_clarinet.rmse]

plt.figure(figsize=(14, 4))
plt.subplot(1,4,1)
plot_metric(x, sdr_average, [23.0, 19.1, 17.7], "SDR (dB)")
plt.title("(a)")

plt.subplot(1,4,2)
plot_metric(x, sir_average, [27.7, 24.0, 22.2], "SIR (dB)")
plt.title("(b)")

plt.subplot(1,4,3)
plot_metric(x, sar_average, [25.1, 21.0, 19.7], "SAR (dB)")
plt.title("(c)")

plt.subplot(1,4,4)
plot_rmse(x=x, rmse=all_rmse)
plt.title("(d)")

plt.tight_layout()
plt.savefig("metrics.pdf")<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.09143533745559795, 'fraction_numerical': 0.18734377055650572, 'mean_word_length': 0.8464901627398591, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 9, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '6', 'dir': 'jupyter-structured-clean-dedup', 'id': '533747', 'license': 'Apache-2.0', 'n_tokens_mistral': 3190, 'n_tokens_neox': 2289, 'n_words': 267, 'path': 'plot-metrics-results.ipynb', 'repo_name': 'PabloAlvarado/ssgp', 'size': '7601'}