From 17b606afe4610d88c3935d6953c2261161279e35 Mon Sep 17 00:00:00 2001 From: ErikJohnsonCU Date: Mon, 25 Jul 2016 12:22:32 +0200 Subject: [PATCH 01/19] Added function for evaluating images framewise --- mir_eval/separation.py | 94 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) diff --git a/mir_eval/separation.py b/mir_eval/separation.py index 4ab1d345..d5b860be 100644 --- a/mir_eval/separation.py +++ b/mir_eval/separation.py @@ -442,6 +442,100 @@ def bss_eval_images(reference_sources, estimated_sources, return (sdr, isr, sir, sar, popt) +def bss_eval_images_framewise(reference_sources, estimated_sources, + window, hop, compute_permutation=False): + """Framewise computation of bss_eval_images + + Examples + -------- + >>> # reference_sources[n] should be an ndarray of samples of the + >>> # n'th reference source + >>> # estimated_sources[n] should be the same for the n'th estimated + >>> # source + >>> (sdr, isr, sir, sar, + ... perm) = mir_eval.separation.bss_eval_images_framewise( + reference_sources, + ... estimated_sources, + window, + .... hop) + + Parameters + ---------- + reference_sources : np.ndarray, shape=(nsrc, nsampl) + matrix containing true sources (must have the same shape as + estimated_sources) + estimated_sources : np.ndarray, shape=(nsrc, nsampl) + matrix containing estimated sources (must have the same shape as + reference_sources) + window : int + Window length for framewise evaluation + hop : int + Hop size for framewise evaluation + compute_permutation : bool, optional + compute permutation of estimate/source combinations for all windows + (False by default) + + Returns + ------- + sdr : np.ndarray, shape=(nsrc, nframes) + vector of Signal to Distortion Ratios (SDR) + isr : np.ndarray, shape=(nsrc, nframes) + vector of source Image to Spatial distortion Ratios (ISR) + sir : np.ndarray, shape=(nsrc, nframes) + vector of Source to Interference Ratios (SIR) + sar : np.ndarray, shape=(nsrc, nframes) + vector of Sources to Artifacts Ratios (SAR) + perm : np.ndarray, shape=(nsrc, nframes) + vector containing the best ordering of estimated sources in + the mean SIR sense (estimated source number perm[j] corresponds to + true source number j) + Note: perm will be range(nsrc) for all windows if compute_permutation + is False + + """ + + # make sure the input is of shape (nsrc, nsampl) + if estimated_sources.ndim == 1: + estimated_sources = estimated_sources[np.newaxis, :] + if reference_sources.ndim == 1: + reference_sources = reference_sources[np.newaxis, :] + + validate(reference_sources, estimated_sources) + # If empty matrices were supplied, return empty lists (special case) + if reference_sources.size == 0 or estimated_sources.size == 0: + return np.array([]), np.array([]), np.array([]), np.array([]) + + nsrc = reference_sources.shape[0] + + nwin = int( + np.floor((reference_sources.shape[1] - window + hop) / hop) + ) + # make sure that more than 1 window will be evaluated + if nwin < 2: + raise ValueError('Invalid window size and hop size have been supplied.' + 'From these paramters it was determined that only {} ' + 'window(s) should be used.'.format(nwin)) + + # compute the criteria across all windows + sdr = np.empty((nsrc, nwin)) + isr = np.empty((nsrc, nwin)) + sir = np.empty((nsrc, nwin)) + sar = np.empty((nsrc, nwin)) + perm = np.empty((nsrc, nwin)) + + # k iterates across all the windows + for k in range(nwin): + win_slice = slice(k * hop, k * hop + window) + sdr[:, k], isr[:, k], sir[:, k], sar[:, k], perm[:, k] = \ + bss_eval_images( + reference_sources[:, win_slice, :], + estimated_sources[:, win_slice, :], + compute_permutation + ) + + return sdr, isr, sir, sar, perm + + def _bss_decomp_mtifilt(reference_sources, estimated_source, j, flen): """Decomposition of an estimated source image into four components representing respectively the true source image, spatial (or filtering) From 5f80a8bec82a76901c796f32e1076e1be6af502c Mon Sep 17 00:00:00 2001 From: ErikJohnsonCU Date: Mon, 25 Jul 2016 14:19:01 +0200 Subject: [PATCH 02/19] Adding evaluation of images framewise --- mir_eval/separation.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/mir_eval/separation.py b/mir_eval/separation.py index d5b860be..ca4afc0e 100644 --- a/mir_eval/separation.py +++ b/mir_eval/separation.py @@ -811,6 +811,18 @@ def evaluate(reference_sources, estimated_sources, **kwargs): scores['Images - Source to Artifact'] = sar.tolist() scores['Images - Source permutation'] = perm.tolist() + sdr, isr, sir, sar, perm = util.filter_kwargs( + bss_eval_images_framewise, + reference_sources, + estimated_sources, + **kwargs + ) + scores['Images Frames - Source to Distortion'] = sdr.tolist() + scores['Images Frames - Image to Spatial'] = isr.tolist() + scores['Images Frames - Source to Interference'] = sir.tolist() + scores['Images Frames - Source to Artifact'] = sar.tolist() + scores['Images Frames - Source permutation'] = perm.tolist() + # Verify we can compute sources on this input if reference_sources.ndim < 3 and estimated_sources.ndim < 3: sdr, sir, sar, perm = util.filter_kwargs( From b0b8544929d4928edeb431c0cc1fbe980cf0c7d2 Mon Sep 17 00:00:00 2001 From: ErikJohnsonCU Date: Mon, 25 Jul 2016 14:32:20 +0200 Subject: [PATCH 03/19] Added default parameters for bss_eval_images_framewise --- mir_eval/separation.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mir_eval/separation.py b/mir_eval/separation.py index ca4afc0e..b20c4b9c 100644 --- a/mir_eval/separation.py +++ b/mir_eval/separation.py @@ -443,7 +443,8 @@ def bss_eval_images(reference_sources, estimated_sources, def bss_eval_images_framewise(reference_sources, estimated_sources, - window, hop, compute_permutation=False): + window=30*44100, hop=15*44100, + compute_permutation=False): """Framewise computation of bss_eval_images Examples From 1bbf2e52cb41252c0e362a26577468fd44bc4a66 Mon Sep 17 00:00:00 2001 From: ErikJohnsonCU Date: Mon, 25 Jul 2016 15:15:27 +0200 Subject: [PATCH 04/19] Using images as fallback for invalid win/hop params; also, changed to use the atleast_3d from numpy --- mir_eval/separation.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/mir_eval/separation.py b/mir_eval/separation.py index b20c4b9c..38827f83 100644 --- a/mir_eval/separation.py +++ b/mir_eval/separation.py @@ -495,11 +495,11 @@ def bss_eval_images_framewise(reference_sources, estimated_sources, """ - # make sure the input is of shape (nsrc, nsampl) - if estimated_sources.ndim == 1: - estimated_sources = estimated_sources[np.newaxis, :] - if reference_sources.ndim == 1: - reference_sources = reference_sources[np.newaxis, :] + # make sure the input has 3 dimensions + # assuming input is in shape (nsampl) or (nsrc, nsampl) + estimated_sources = np.atleast_3d(estimated_sources) + reference_sources = np.atleast_3d(reference_sources) + # we will ensure input doesn't have more than 3 dimensions in validate validate(reference_sources, estimated_sources) # If empty matrices were supplied, return empty lists (special case) @@ -511,11 +511,11 @@ def bss_eval_images_framewise(reference_sources, estimated_sources, nwin = int( np.floor((reference_sources.shape[1] - window + hop) / hop) ) - # make sure that more than 1 window will be evaluated + # if fewer than 2 windows would be evaluated, return the images result if nwin < 2: - raise ValueError('Invalid window size and hop size have been supplied.' - 'From these paramters it was determined that only {} ' - 'window(s) should be used.'.format(nwin)) + return bss_eval_images(reference_sources, + estimated_sources, + compute_permutation) # compute the criteria across all windows sdr = np.empty((nsrc, nwin)) From b63f2d86d4368e25b91b3b8accb7a902c2d2ec35 Mon Sep 17 00:00:00 2001 From: ErikJohnsonCU Date: Mon, 25 Jul 2016 15:15:57 +0200 Subject: [PATCH 05/19] Images framewise is now being unit tested --- tests/test_separation.py | 59 +++++++++++++++++++++++++++------------- 1 file changed, 40 insertions(+), 19 deletions(-) diff --git a/tests/test_separation.py b/tests/test_separation.py index 8912ee6e..837ad92a 100644 --- a/tests/test_separation.py +++ b/tests/test_separation.py @@ -55,7 +55,8 @@ def __unit_test_empty_input(metric): if (metric == mir_eval.separation.bss_eval_sources or metric == mir_eval.separation.bss_eval_images): args = [np.array([]), np.array([])] - elif metric == mir_eval.separation.bss_eval_sources_framewise: + elif (metric == mir_eval.separation.bss_eval_sources_framewise or + metric == mir_eval.separation.bss_eval_images_framewise): args = [np.array([]), np.array([]), 40, 20] with warnings.catch_warnings(record=True) as w: warnings.simplefilter('always') @@ -98,7 +99,8 @@ def __unit_test_silent_input(metric): def __unit_test_incompatible_shapes(metric): # Test for error when shape is different - if metric == mir_eval.separation.bss_eval_images: + if (metric == mir_eval.separation.bss_eval_images or + metric == mir_eval.separation.bss_eval_images_framewise): sources_4 = np.random.random_sample((4, 100, 2)) sources_3 = np.random.random_sample((3, 100, 2)) sources_4_chan = np.random.random_sample((4, 100, 3)) @@ -109,7 +111,8 @@ def __unit_test_incompatible_shapes(metric): metric == mir_eval.separation.bss_eval_images): args1 = [sources_3, sources_4] args2 = [sources_4, sources_3] - elif metric == mir_eval.separation.bss_eval_sources_framewise: + elif (metric == mir_eval.separation.bss_eval_sources_framewise or + metric == mir_eval.separation.bss_eval_images_framewise): args1 = [sources_3, sources_4, 40, 20] args2 = [sources_4, sources_3, 40, 20] nose.tools.assert_raises(ValueError, metric, *args1) @@ -151,20 +154,36 @@ def __unit_test_default_permutation(metric): def __unit_test_framewise_small_window(metric): # Test for invalid win/hop parameter detection - ref_sources = np.random.random_sample((4, 100)) - est_sources = np.random.random_sample((4, 100)) - # Rest with window larger than source lengths - assert np.allclose(metric(ref_sources, est_sources, window=120, hop=20), - mir_eval.separation.bss_eval_sources(ref_sources, - est_sources, - False), - atol=A_TOL) - # Test with hop larger than source length - assert np.allclose(metric(ref_sources, est_sources, window=20, hop=120), - mir_eval.separation.bss_eval_sources(ref_sources, - est_sources, - False), - atol=A_TOL) + if metric == mir_eval.separation.bss_eval_sources_framewise: + ref_sources = np.random.random_sample((4, 100)) + est_sources = np.random.random_sample((4, 100)) + # Test with window larger than source length + assert np.allclose(metric(ref_sources, est_sources, window=120, hop=20), + mir_eval.separation.bss_eval_sources(ref_sources, + est_sources, + False), + atol=A_TOL) + # Test with hop larger than source length + assert np.allclose(metric(ref_sources, est_sources, window=20, hop=120), + mir_eval.separation.bss_eval_sources(ref_sources, + est_sources, + False), + atol=A_TOL) + elif metric == mir_eval.separation.bss_eval_images_framewise: + ref_images = np.random.random_sample((4, 100, 2)) + est_images = np.random.random_sample((4, 100, 2)) + # Test with window larger than source length + assert np.allclose(metric(ref_images, est_images, window=120, hop=20), + mir_eval.separation.bss_eval_images(ref_images, + est_images, + False), + atol=A_TOL) + # Test with hop larger than source length + assert np.allclose(metric(ref_images, est_images, window=20, hop=120), + mir_eval.separation.bss_eval_images(ref_images, + est_images, + False), + atol=A_TOL) def __check_score(sco_f, metric, score, expected_score): @@ -182,7 +201,8 @@ def test_separation_functions(): # Unit tests for metric in [mir_eval.separation.bss_eval_sources, mir_eval.separation.bss_eval_sources_framewise, - mir_eval.separation.bss_eval_images]: + mir_eval.separation.bss_eval_images, + mir_eval.separation.bss_eval_images_framewise]: yield (__unit_test_empty_input, metric) yield (__unit_test_silent_input, metric) yield (__unit_test_incompatible_shapes, metric) @@ -191,7 +211,8 @@ def test_separation_functions(): for metric in [mir_eval.separation.bss_eval_sources, mir_eval.separation.bss_eval_images]: yield (__unit_test_default_permutation, metric) - for metric in [mir_eval.separation.bss_eval_sources_framewise]: + for metric in [mir_eval.separation.bss_eval_sources_framewise, + mir_eval.separation.bss_eval_images_framewise]: yield (__unit_test_framewise_small_window, metric) # Regression tests for ref_f, est_f, sco_f in zip(ref_files, est_files, sco_files): From 7aaead277582ab44ade63989a9d11811c5962a57 Mon Sep 17 00:00:00 2001 From: ErikJohnsonCU Date: Mon, 25 Jul 2016 15:25:32 +0200 Subject: [PATCH 06/19] Reordered computing scores and comparing them to prevent downtime issues --- tests/test_separation.py | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/tests/test_separation.py b/tests/test_separation.py index 837ad92a..d007d15c 100644 --- a/tests/test_separation.py +++ b/tests/test_separation.py @@ -228,20 +228,12 @@ def test_separation_functions(): if ref_sources.shape[0] == 1 and est_sources.shape[0] == 1: ref_sources = ref_sources[0] est_sources = est_sources[0] + # Compute scores scores = mir_eval.separation.evaluate( ref_sources, est_sources, window=expected_frames['win'], hop=expected_frames['hop'] ) - ref_images = __generate_multichannel(ref_sources, - expected_images['nchan']) - est_images = __generate_multichannel(est_sources, - expected_images['nchan'], - expected_images['gain'], - expected_images['reverse']) - image_scores = mir_eval.separation.evaluate( - ref_images, est_images - ) # Compare them for metric in scores: if 'Sources - ' in metric: @@ -254,12 +246,25 @@ def test_separation_functions(): # This is a simple hack to make nosetest's messages more useful yield (__check_score, sco_f, metric, scores[metric], expected_frames[test_data_name]) + + # Compute scores with images + ref_images = __generate_multichannel(ref_sources, + expected_images['nchan']) + est_images = __generate_multichannel(est_sources, + expected_images['nchan'], + expected_images['gain'], + expected_images['reverse']) + image_scores = mir_eval.separation.evaluate( + ref_images, est_images + ) + # Compare them for metric in image_scores: if 'Images - ' in metric: test_data_name = metric.replace('Images - ', '') # This is a simple hack to make nosetest's messages more useful yield (__check_score, sco_f, metric, image_scores[metric], expected_images[test_data_name]) + # Catch a few exceptions in the evaluate function image_scores = mir_eval.separation.evaluate(ref_images, est_images) # make sure sources is not being evaluated on images From 225c3debebd5c91897da80e5859eb83d2b528c52 Mon Sep 17 00:00:00 2001 From: ErikJohnsonCU Date: Mon, 25 Jul 2016 15:30:39 +0200 Subject: [PATCH 07/19] Added regression testing; pep8 fix --- tests/test_separation.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/tests/test_separation.py b/tests/test_separation.py index d007d15c..60a19024 100644 --- a/tests/test_separation.py +++ b/tests/test_separation.py @@ -158,13 +158,15 @@ def __unit_test_framewise_small_window(metric): ref_sources = np.random.random_sample((4, 100)) est_sources = np.random.random_sample((4, 100)) # Test with window larger than source length - assert np.allclose(metric(ref_sources, est_sources, window=120, hop=20), + assert np.allclose(metric(ref_sources, est_sources, + window=120, hop=20), mir_eval.separation.bss_eval_sources(ref_sources, est_sources, False), atol=A_TOL) # Test with hop larger than source length - assert np.allclose(metric(ref_sources, est_sources, window=20, hop=120), + assert np.allclose(metric(ref_sources, est_sources, + window=20, hop=120), mir_eval.separation.bss_eval_sources(ref_sources, est_sources, False), @@ -221,6 +223,7 @@ def test_separation_functions(): expected_sources = expected_results['Sources'] expected_frames = expected_results['Framewise'] expected_images = expected_results['Images'] + expected_images = expected_results['Images Framewise'] # Load in example source separation data ref_sources = __load_and_stack_wavs(ref_f) est_sources = __load_and_stack_wavs(est_f) @@ -264,7 +267,12 @@ def test_separation_functions(): # This is a simple hack to make nosetest's messages more useful yield (__check_score, sco_f, metric, image_scores[metric], expected_images[test_data_name]) - + elif 'Images Frames - ' in metric: + test_data_name = metric.replace('Images Frames - ', '') + # This is a simple hack to make nosetest's messages more useful + yield (__check_score, sco_f, metric, images_scores[metric], + expected_image_frames[test_data_name]) + # Catch a few exceptions in the evaluate function image_scores = mir_eval.separation.evaluate(ref_images, est_images) # make sure sources is not being evaluated on images From 318c8d223b8f5ad38d0d9b386d347b1a91407a38 Mon Sep 17 00:00:00 2001 From: ErikJohnsonCU Date: Mon, 25 Jul 2016 16:28:34 +0200 Subject: [PATCH 08/19] Updated handling of regressions tests --- tests/test_separation.py | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/tests/test_separation.py b/tests/test_separation.py index 60a19024..40df5e0a 100644 --- a/tests/test_separation.py +++ b/tests/test_separation.py @@ -223,7 +223,7 @@ def test_separation_functions(): expected_sources = expected_results['Sources'] expected_frames = expected_results['Framewise'] expected_images = expected_results['Images'] - expected_images = expected_results['Images Framewise'] + expected_image_frames = expected_results['Images Framewise'] # Load in example source separation data ref_sources = __load_and_stack_wavs(ref_f) est_sources = __load_and_stack_wavs(est_f) @@ -267,10 +267,25 @@ def test_separation_functions(): # This is a simple hack to make nosetest's messages more useful yield (__check_score, sco_f, metric, image_scores[metric], expected_images[test_data_name]) - elif 'Images Frames - ' in metric: + + # Compute scores with images framewise + ref_images = __generate_multichannel(ref_sources, + expected_image_frames['nchan']) + est_images = __generate_multichannel(est_sources, + expected_image_frames['nchan'], + expected_image_frames['gain'], + expected_image_frames['reverse']) + imageframe_scores = mir_eval.separation.evaluate( + ref_images, est_images, + window=expected_image_frames['win'], + hop=expected_image_frames['hop'] + ) + # Compare them + for metric in imageframe_scores: + if 'Images Frames - ' in metric: test_data_name = metric.replace('Images Frames - ', '') # This is a simple hack to make nosetest's messages more useful - yield (__check_score, sco_f, metric, images_scores[metric], + yield (__check_score, sco_f, metric, imageframe_scores[metric], expected_image_frames[test_data_name]) # Catch a few exceptions in the evaluate function From a410e4d55584334f0506cf49be44b1712e61e089 Mon Sep 17 00:00:00 2001 From: ErikJohnsonCU Date: Mon, 25 Jul 2016 16:30:35 +0200 Subject: [PATCH 09/19] Added image framewise data to output0*.json files --- tests/data/separation/output00.json | 77 +++++++++ tests/data/separation/output01.json | 57 +++++++ tests/data/separation/output02.json | 182 ++++++++++++++++++++ tests/data/separation/output03.json | 197 ++++++++++++++++++++++ tests/data/separation/output04.json | 212 ++++++++++++++++++++++++ tests/data/separation/output05.json | 137 +++++++++++++++ tests/data/separation/output06.json | 247 ++++++++++++++++++++++++++++ tests/data/separation/output07.json | 137 +++++++++++++++ tests/data/separation/output08.json | 182 ++++++++++++++++++++ tests/data/separation/output09.json | 57 +++++++ 10 files changed, 1485 insertions(+) diff --git a/tests/data/separation/output00.json b/tests/data/separation/output00.json index c4ca5840..1c704ec0 100644 --- a/tests/data/separation/output00.json +++ b/tests/data/separation/output00.json @@ -149,5 +149,82 @@ "nchan": 2, "gain": 1.5, "reverse": false + }, + "Images Framewise": { + "Source to Distortion": [ + [ + 5.765801019420289, + 7.266395826142244 + ], + [ + 0.19396358594099453, + -1.0984214909945924 + ], + [ + 7.16320186225577, + 4.927209601507589 + ] + ], + "Image to Spatial": [ + [ + 6.923538027766627, + 8.811977631819518 + ], + [ + 1.2952513440963038, + 0.232520540758112 + ], + [ + 9.0805822127866, + 8.747385899072462 + ] + ], + "Source to Interference": [ + [ + 9.758854746145582, + 11.253811991113311 + ], + [ + 6.189932955202918, + 5.7447815523011965 + ], + [ + 16.628665368962928, + 14.244460824190718 + ] + ], + "Source to Artifact": [ + [ + 13.066432617004098, + 13.544201213948446 + ], + [ + 7.654747815679217, + 4.918165618459598 + ], + [ + 16.425802018734363, + 10.663099187584482 + ] + ], + "Source permutation": [ + [ + 0.0, + 0.0 + ], + [ + 1.0, + 1.0 + ], + [ + 2.0, + 2.0 + ] + ], + "win": 4000, + "hop": 4000, + "nchan": 4, + "gain": 1.5, + "reverse": false } } diff --git a/tests/data/separation/output01.json b/tests/data/separation/output01.json index a409d5c4..b758e55c 100644 --- a/tests/data/separation/output01.json +++ b/tests/data/separation/output01.json @@ -108,5 +108,62 @@ "nchan": 2, "gain": 0.0, "reverse": false + }, + "Images Framewise": { + "Source to Distortion": [ + [ + -3.610134649333453, + -3.8689468446156905 + ], + [ + -1.025984860608304, + -0.3227907605130132 + ] + ], + "Image to Spatial": [ + [ + -3.122461076386494, + -3.20865288224359 + ], + [ + -0.9437277119526215, + -0.23800696552017314 + ] + ], + "Source to Interference": [ + [ + 3.9650508040494343, + 2.5015023988684137 + ], + [ + 19.22571259353907, + 20.412950345526504 + ] + ], + "Source to Artifact": [ + [ + 10.543876939080949, + 12.175832774712031 + ], + [ + 11.046588452497266, + 11.060465308797735 + ] + ], + "Source permutation": [ + [ + 0.0, + 0.0 + ], + [ + 1.0, + 1.0 + ] + ], + "win": 3500, + "hop": 3000, + "nchan": 2, + "gain": 0.0, + "reverse": false } } diff --git a/tests/data/separation/output02.json b/tests/data/separation/output02.json index bdccb1f4..242229f7 100644 --- a/tests/data/separation/output02.json +++ b/tests/data/separation/output02.json @@ -173,5 +173,187 @@ "nchan": 2, "gain": 3.0, "reverse": true + }, + "Images Framewise": { + "Source to Distortion": [ + [ + -11.614228844618804, + -5.008678822252923, + 3.2383992767890897, + 5.453958144668951, + 2.1004345511608293, + 1.578438283107806, + 1.7170021719232518, + -6.724556591393716, + -2.7989921444160815 + ], + [ + -2.6772513397327313, + -7.70614904807331, + -12.643073365588425, + -13.857563303999301, + -14.794561242422972, + -14.419593058031563, + -14.243452366815628, + -3.4840667763821425, + -6.687913508461344 + ], + [ + 2.053185842579845, + 1.9854522015713219, + 1.9249036337181638, + 1.686324789474099, + -4.208020949310968, + -6.239651644568832, + -5.800603582950306, + -4.155670065507797, + -6.998789124033747 + ] + ], + "Image to Spatial": [ + [ + -6.342642426729091, + -1.3779534168628726, + 5.0702131939383275, + 5.831309013846431, + 2.245863798407403, + 1.6601523401957372, + 1.9142589759698259, + -3.9870380440341373, + 0.037586973762036194 + ], + [ + -1.349377784842438, + -5.953438120047759, + -10.972563351438128, + -12.102748321014795, + -12.227860344070313, + -12.372687676758218, + -11.091952373738739, + -1.5355525512440464, + -5.441900648087925 + ], + [ + 2.302722293773217, + 2.200164843986763, + 2.3854236136064895, + 2.3883773862073503, + -0.5838165671281382, + -2.782932641429039, + -2.0511812620158207, + -0.4175484764395975, + -1.2608875491737064 + ] + ], + "Source to Interference": [ + [ + -3.3613113999856163, + -0.41805884815136635, + 5.750722250758927, + 13.873877719484689, + 11.42278577755504, + 11.873782067658286, + 9.384158517962705, + 0.1435793526388831, + -3.391552081359699 + ], + [ + 4.161081261514829, + 3.6783663705120957, + 4.713902939692706, + 4.626415069648544, + 2.549111345491055, + 3.8484107053594805, + 1.4468443970717002, + 2.9811351444485936, + 5.280572440663402 + ], + [ + 17.032502610132568, + 17.84514318855103, + 14.647512685778041, + 12.89597395611403, + 2.2986470964724908, + 1.689623135153164, + 1.3021290607635574, + 1.7020151053995032, + -1.1403297080475863 + ] + ], + "Source to Artifact": [ + [ + 29.541159284469806, + 30.284864376603664, + 32.08543046340018, + 24.46893976177227, + 23.35092262389296, + 27.360805465361423, + 18.146874195853638, + 23.676860735173122, + 38.97742383230484 + ], + [ + 25.22211095028493, + 34.44975192338721, + 33.74005006567967, + 29.643799086977968, + 24.02516118091551, + 20.230457095840976, + 21.146115340325892, + 27.153624219688183, + 27.147893384824293 + ], + [ + 36.132481064536144, + 34.103272414992134, + 32.69176471834025, + 27.454243214386686, + 25.04546556931182, + 22.78196778318227, + 23.33323120636724, + 24.409598992734267, + 29.106022947464627 + ] + ], + "Source permutation": [ + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ], + [ + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0 + ], + [ + 2.0, + 2.0, + 2.0, + 2.0, + 2.0, + 2.0, + 2.0, + 2.0, + 2.0 + ] + ], + "win": 1200, + "hop": 800, + "nchan": 2, + "gain": 3.0, + "reverse": true } } diff --git a/tests/data/separation/output03.json b/tests/data/separation/output03.json index e6b2150e..b64bc30b 100644 --- a/tests/data/separation/output03.json +++ b/tests/data/separation/output03.json @@ -190,5 +190,202 @@ "nchan": 1, "gain": 0.5, "reverse": false + }, + "Images Framewise": { + "Source to Distortion": [ + [ + 4.19954929801372, + 3.96782825444149, + 4.361892868515408, + 6.5073212368026825, + 6.955560133790401, + 5.984627571776252, + 7.929196739408663 + ], + [ + -1.4095944954010409e-05, + -2.8326066278908866e-06, + 1.1949171397866073e-05, + 9.838309428075156e-06, + -0.043281902154532, + -1.409758632530891, + -1.4422546911181748 + ], + [ + 3.117618233726835, + -0.28622284622982813, + -0.015140774063767213, + 5.574189592449486, + 3.7010547007907855, + 1.167937056847659, + 0.4592080989842254 + ], + [ + 7.354561939979786, + 8.361046167970864, + 6.775511410749754, + 6.889497911805611, + 6.804044580985504, + 6.417840147181597, + 8.290624270950048 + ] + ], + "Image to Spatial": [ + [ + 6.112430375659283, + 5.316079069648002, + 5.027546972941165, + 7.561106359147739, + 9.767718417885034, + 9.05195120319567, + 10.595479265345196 + ], + [ + -1.4080045367696296e-05, + -2.817805683465462e-06, + 1.1963908148885579e-05, + 9.85242188014322e-06, + -0.0413096055991435, + 1.04551585205587, + 0.6549993870997048 + ], + [ + 5.452577519367842, + 0.5197310016117918, + 0.0038051781058960924, + 5.86891871912888, + 5.528354657099386, + 3.496684925008192, + 0.6693780756670293 + ], + [ + 9.918609420131812, + 10.363424299608557, + 8.899797095616515, + 8.279821888574899, + 7.633159453549365, + 7.435927366549889, + 10.021556206256408 + ] + ], + "Source to Interference": [ + [ + 6.517511430418773, + 5.811584235204686, + 9.584118567039901, + 12.0535044371654, + 9.757649467411412, + 8.950021021537328, + 10.46565243486915 + ], + [ + -7.063426513233857, + -6.919588115314706, + -7.0510675813016475, + -6.414204157657953, + -11.905715000061399, + -4.197909156233509, + -2.4813855006475842 + ], + [ + 4.141014910687602, + -3.0662821416570836, + -10.876089318848761, + 13.1396178007717, + 5.717548749645411, + 0.2376957317518501, + -4.954793379034611 + ], + [ + 12.922416671673943, + 14.906538658441146, + 13.278126105039757, + 14.832517357389065, + 15.848218198376067, + 15.42135925531434, + 15.706812594153735 + ] + ], + "Source to Artifact": [ + [ + 21.048836346016834, + 21.608583262197634, + 27.951027125793622, + 16.72864879954062, + 19.710211838041786, + 23.24729692355166, + 29.2821572605892 + ], + [ + 4.79964549937246, + 6.007384762964339, + 5.752039211870982, + 4.961749710617883, + 8.947021685277118, + 11.332878323275246, + 16.112437890835338 + ], + [ + 19.123969289544746, + 30.52457226127728, + 5.194061850315177, + 18.53256678532119, + 13.088137800677963, + 10.597476679719989, + 13.214694804585587 + ], + [ + 19.72218257905594, + 21.055515792722215, + 20.12256294009786, + 19.96175152988701, + 25.866418972581066, + 23.003854645101143, + 20.69699250545369 + ] + ], + "Source permutation": [ + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ], + [ + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0 + ], + [ + 2.0, + 2.0, + 2.0, + 2.0, + 2.0, + 2.0, + 2.0 + ], + [ + 3.0, + 3.0, + 3.0, + 3.0, + 3.0, + 3.0, + 3.0 + ] + ], + "win": 2000, + "hop": 1000, + "nchan": 1, + "gain": 0.5, + "reverse": false } } diff --git a/tests/data/separation/output04.json b/tests/data/separation/output04.json index 0b95bffc..7f0d56b2 100644 --- a/tests/data/separation/output04.json +++ b/tests/data/separation/output04.json @@ -197,5 +197,217 @@ "nchan": 3, "gain": 1.0, "reverse": false + }, + "Images Framewise": { + "Source to Distortion": [ + [ + -69.69527123473684, + -35.348093205165576, + 0.22632515818016077, + 1.4459191678498002, + 1.7294217468646105, + 1.1943333889107919, + 2.7461662695468014, + 2.4240026536532695, + 0.930618987341416, + -0.02790985656979421, + -9.475525617658395 + ], + [ + 2.628133531074054, + 4.797260678085674, + 2.0322241000181878, + 1.8375014269727257, + 4.080284813458051, + 6.489628105488711, + 6.619640494730196, + 7.069564889767309, + 7.149153270829386, + 4.1146275966053185, + 3.8428666193681646 + ], + [ + -7.637346617080054, + -6.421853536559331, + 1.6557440105415995, + 2.694705003310156, + 3.1515696772347654, + 2.502402939854686, + 1.6320080810079087, + 0.4278603732294692, + -2.83972953425075, + 0.7311056900801627, + -0.14210420081540737 + ] + ], + "Image to Spatial": [ + [ + -60.305857971258604, + -12.542877541425097, + 0.7699794781333442, + 2.1096388945557503, + 1.846405471308101, + 1.256418673831412, + 2.9189906481635908, + 2.558675001774139, + 0.9337938993283246, + 0.34731253044085086, + -9.156879387518423 + ], + [ + 2.726634654193765, + 5.166663399799997, + 2.1536256559415565, + 1.9405683843616603, + 4.338618024256618, + 6.895862987087321, + 7.027180569035778, + 7.273361115164957, + 7.543451076531234, + 4.620039002824196, + 4.167556949552122 + ], + [ + -6.227822595360058, + -5.872302679060403, + 1.9465343004445954, + 2.8878871994704114, + 3.2647401888779766, + 2.591118484554555, + 1.7348569897155954, + 0.6663746492874474, + -2.5625556537373697, + 0.983436184786256, + 0.3974327072324222 + ] + ], + "Source to Interference": [ + [ + -8.829306210944807, + -23.480971595241535, + 7.059521892291825, + 4.133735249428017, + 5.8388924741395165, + 4.4937992073152735, + 7.967678828793344, + 6.888655922455486, + 13.015310294683577, + 2.008554678866135, + 11.094100807705125 + ], + [ + 10.756738994041102, + 10.371661990956396, + 7.689352133142408, + 8.247678356617492, + 10.274758472717252, + 12.403973483299344, + 12.525959433845522, + 15.94781895080037, + 13.191164737504815, + 8.995610250482786, + 9.953044224411078 + ], + [ + 6.953130200226932, + 11.777345804140165, + 11.874027676766579, + 12.696042581680285, + 15.846527035285083, + 17.563023457519794, + 17.37299148516163, + 13.293065166827398, + 13.426441218299821, + 10.445123468698947, + 7.23227730518786 + ] + ], + "Source to Artifact": [ + [ + 21.941634743045867, + 8.160150549904461, + 33.89413949508541, + 23.097988721367663, + 19.63258455512275, + 16.229520324254942, + 15.374106790710806, + 19.932867195659153, + 24.069435289802104, + 23.478600044968356, + 33.94655039984599 + ], + [ + 17.870916311035113, + 21.09708482122684, + 23.724227713210038, + 20.2793040331052, + 26.161101365641585, + 23.79121658145224, + 24.97879999406802, + 27.542081409592928, + 29.381619250118447, + 24.03745708932051, + 32.436190166006 + ], + [ + 16.472644196494972, + 19.531896640021277, + 20.564398949037034, + 23.21705335442989, + 28.766682637653563, + 27.569054386194708, + 22.30178126373824, + 24.435552042622653, + 32.55743586341363, + 24.53288460782584, + 30.373462422534875 + ] + ], + "Source permutation": [ + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ], + [ + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0 + ], + [ + 2.0, + 2.0, + 2.0, + 2.0, + 2.0, + 2.0, + 2.0, + 2.0, + 2.0, + 2.0, + 2.0 + ] + ], + "win": 1200, + "hop": 650, + "nchan": 3, + "gain": 1.0, + "reverse": false } } diff --git a/tests/data/separation/output05.json b/tests/data/separation/output05.json index a391eb55..169d2c5c 100644 --- a/tests/data/separation/output05.json +++ b/tests/data/separation/output05.json @@ -149,5 +149,142 @@ "nchan": 3, "gain": 2.0, "reverse": false + }, + "Images Framewise": { + "Source to Distortion": [ + [ + 1.4640689573054708, + 2.7226855497949582, + 2.01993537403283, + 2.0707454220204204, + 1.7654217138662174, + 2.2757164947868103 + ], + [ + 0.5862203071772628, + -2.555224133136584, + 0.8281683915332907, + 3.9038945737714243, + -8.166310458073198, + 0.8747108716969225 + ], + [ + 1.863929146719244, + 0.4142955685304883, + -0.16934518084163938, + -11.026720818380532, + 2.337017329764834, + 1.2285975158734879 + ] + ], + "Image to Spatial": [ + [ + 2.6743459740517226, + 3.042138197061535, + 2.171851184655353, + 2.21990367646539, + 1.846909125722322, + 2.5667921667091735 + ], + [ + 6.986314555664403, + 1.1937990357095065, + 5.924077706272566, + 6.798483342879064, + -3.204161142391748, + 5.557574882687534 + ], + [ + 2.786320464519493, + 1.269399072157903, + 2.104572025397564, + -8.40225081501467, + 3.7447725133852394, + 2.015366273884354 + ] + ], + "Source to Interference": [ + [ + 12.765249358380775, + 18.548198183998743, + 21.569416698088144, + 21.727537677331597, + 25.074504410436198, + 19.402044610245785 + ], + [ + 3.7592947147237785, + 2.9643292422894167, + 3.452116466887226, + 8.899907126021503, + -0.013364077846654426, + 4.022713791128474 + ], + [ + 13.999736036820355, + 12.840068935705089, + 7.855245399766267, + 2.0128900158477583, + 13.254460388413138, + 14.258924158864893 + ] + ], + "Source to Artifact": [ + [ + 17.46646353982129, + 30.644492294757285, + 31.818177532765706, + 31.403875117839682, + 29.74250631357192, + 25.761011954998366 + ], + [ + 13.907474926809986, + 19.286311719640786, + 18.04982905161036, + 21.324899980967157, + 8.41500346678665, + 12.911722511535594 + ], + [ + 20.679963242054285, + 26.253638565170796, + 20.398063822188437, + 14.984999356426009, + 16.75512438509712, + 21.923413760164983 + ] + ], + "Source permutation": [ + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ], + [ + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0 + ], + [ + 2.0, + 2.0, + 2.0, + 2.0, + 2.0, + 2.0 + ] + ], + "win": 1600, + "hop": 1200, + "nchan": 3, + "gain": 2.0, + "reverse": false } } diff --git a/tests/data/separation/output06.json b/tests/data/separation/output06.json index 8686794c..36eba7f9 100644 --- a/tests/data/separation/output06.json +++ b/tests/data/separation/output06.json @@ -220,5 +220,252 @@ "nchan": 2, "gain": 0.15, "reverse": true + }, + "Images Framewise": { + "Source to Distortion": [ + [ + 4.117419268849969, + 3.404760584148478, + 3.580617666901382, + 3.5797608104702894, + 3.659998659710374, + 4.207105486629724, + 4.270863765260916, + 4.220394181272049, + 4.216632880349893, + 3.9285482622458283, + 3.5546202403109177, + 3.9486055105584943, + 4.111378352283996, + 4.235035943571582, + 4.221309951381499, + 4.257700615094955, + 4.3013969596916715, + 4.285296208666528, + 4.307183770801567, + 4.139987661546405, + 4.115106885313501 + ], + [ + 3.1905908448064144, + 3.247026431796786, + 3.194355189052204, + 3.0654520919430723, + 2.61420098085057, + 0.2087777138236804, + -2.3484300223219923, + -2.9419470404441945, + -6.020107795326631, + -6.03024714724787, + 3.115826293743474, + 3.2023857090762124, + 2.9876542216812414, + -1.8264261719831683, + -2.926105777573023, + -1.63949835880122, + -3.7989003862454163, + -11.768189421606994, + -18.02829560081907, + 3.1414599127022482, + 3.518099641928803 + ] + ], + "Image to Spatial": [ + [ + 4.265946270456123, + 3.862008474995351, + 4.006347275011335, + 4.012938245485315, + 4.001145757814493, + 4.2954232993153205, + 4.315513654297631, + 4.266107502288021, + 4.272049981361309, + 4.056150986107566, + 3.8994045526807386, + 4.231496668590401, + 4.239916766404593, + 4.302680762837564, + 4.27309780314319, + 4.318665094317284, + 4.343992335550145, + 4.324702081070074, + 4.34969534547889, + 4.293376619628399, + 4.288744140001434 + ], + [ + 3.4332164140630663, + 3.3665447951896637, + 3.3129303686199356, + 3.2638752736746355, + 2.8421960702384803, + 0.894774218732992, + -0.013513052652211146, + -0.7698875505954419, + -2.232912338699759, + 2.378386225593676, + 3.7150052170924344, + 3.524371675011229, + 3.23366107884534, + 0.12244334429659523, + 0.7237286409011028, + 1.1697520139872948, + -0.917728106038417, + -9.371059914549628, + -9.114054598374521, + 3.4224066196840885, + 3.730955345937695 + ] + ], + "Source to Interference": [ + [ + 16.983165650601663, + 11.066620858417622, + 11.119816633976146, + 11.248434408986954, + 12.128696219802212, + 19.135967626002905, + 22.814960093762927, + 22.86219678220032, + 24.300128659031138, + 23.182897730381807, + 13.63586735429285, + 13.749698225717568, + 17.4068887219101, + 20.684358361309823, + 23.949389057406552, + 23.5748588387573, + 25.266629369058286, + 22.70430033353293, + 28.523071184674997, + 17.13053776301665, + 16.540378844175308 + ], + [ + 12.761302701095055, + 16.72542339885745, + 15.505315585790246, + 12.822840381088369, + 11.569695660590076, + 3.5198548561316216, + 0.3365083764475069, + 1.1806141185066974, + -0.9230897029461338, + -2.5762143138653473, + 9.106024425218695, + 11.226290236193112, + 12.707662470218244, + 3.575003104313886, + -4.155211115829531, + -3.156892835440776, + 0.8942659662898784, + 2.3983185381577683, + -5.992697570650948, + 12.91831641115734, + 15.40943603382102 + ] + ], + "Source to Artifact": [ + [ + 21.990778005120966, + 18.33374653003158, + 20.54772668796959, + 18.23786659984509, + 19.405526331340955, + 24.337330971503857, + 25.400719693560475, + 24.749387110513187, + 21.744645957909057, + 15.922780436530795, + 14.426776962742519, + 20.018559739003905, + 23.099310341297887, + 24.426373457428475, + 22.870091804408545, + 21.982106951716602, + 23.43382939422338, + 27.67502058361842, + 22.35677824908202, + 21.26394948318737, + 20.25679399600897 + ], + [ + 14.012229445929735, + 16.385904318490848, + 17.323999898629516, + 14.013214533201236, + 12.63037124891111, + 5.567003858183495, + 6.13053861839874, + 7.385045791985267, + 3.407815607327187, + 3.4811516488944223, + 11.721747364516418, + 14.464250937057635, + 14.46875430787298, + 8.405501929920085, + 5.818303254182101, + 2.686539545460951, + 1.8346519846706086, + 8.477254710078375, + 2.2431515909828548, + 12.830549832539608, + 14.43788870978543 + ] + ], + "Source permutation": [ + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ], + [ + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0 + ] + ], + "win": 1400, + "hop": 700, + "nchan": 2, + "gain": 0.15, + "reverse": true } } diff --git a/tests/data/separation/output07.json b/tests/data/separation/output07.json index 8c430a4e..95ea55df 100644 --- a/tests/data/separation/output07.json +++ b/tests/data/separation/output07.json @@ -132,5 +132,142 @@ "nchan": 3, "gain": 0.0, "reverse": false + }, + "Images Framewise": { + "Source to Distortion": [ + [ + 1.7557212625185228, + 1.7547138785946859, + 1.7596843790872958, + 1.759055848870768, + 1.75875122726139, + 1.7574519775193291, + 1.7568176293537074, + 1.7586480165943554, + 1.7592363101234085, + 1.7592638145539201 + ], + [ + 1.6924649211005733, + 1.7016692668632922, + 1.7043722099280738, + 1.7036499830252747, + 1.7041040471838227, + 1.7039242185501602, + 1.7041741414448572, + 1.7043970483380702, + 1.702430129381245, + 1.701751212753497 + ] + ], + "Image to Spatial": [ + [ + 1.7564115904843982, + 1.7597473682073619, + 1.7602869182174874, + 1.7594335093388682, + 1.7595170180900648, + 1.7592760076460983, + 1.759173760912185, + 1.7593912607029725, + 1.7602184244029835, + 1.7600362671204637 + ], + [ + 1.699285156121919, + 1.7045012461538642, + 1.7050670369289587, + 1.704666147436396, + 1.7049902335583038, + 1.704933563419315, + 1.7051655313634067, + 1.7047425405294456, + 1.7046661546430155, + 1.7048499625703208 + ] + ], + "Source to Interference": [ + [ + 37.056235077774694, + 29.043142694487507, + 38.359246563037466, + 39.94487087969612, + 39.60727483971729, + 36.32235632350306, + 32.80999282286602, + 37.37369532659421, + 34.47844490855107, + 37.066900409446795 + ], + [ + 27.845610482247693, + 34.54337418051188, + 38.54337124491327, + 35.20532609961636, + 37.13331395958441, + 38.312971130155766, + 37.57026768559318, + 41.02765296778991, + 32.00348725880361, + 33.39351433530094 + ] + ], + "Source to Artifact": [ + [ + 38.72597583438812, + 29.46056377170782, + 38.71216923958582, + 41.14219899235472, + 36.02608487624218, + 32.01594355122171, + 32.29432790970482, + 37.67870708376333, + 39.58485326321377, + 37.705799379313504 + ], + [ + 31.003032704528973, + 31.969991606882164, + 39.965547938040004, + 42.99973779384051, + 39.45444733874109, + 36.94611082395758, + 37.73177148963505, + 43.91104655926426, + 38.17623422559254, + 31.798816376335633 + ] + ], + "Source permutation": [ + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ], + [ + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0 + ] + ], + "win": 1000, + "hop": 750, + "nchan": 3, + "gain": 0.0, + "reverse": false } } diff --git a/tests/data/separation/output08.json b/tests/data/separation/output08.json index c579a4e9..52f55f11 100644 --- a/tests/data/separation/output08.json +++ b/tests/data/separation/output08.json @@ -173,5 +173,187 @@ "nchan": 4, "gain": 1.0, "reverse": false + }, + "Images Framewise": { + "Source to Distortion": [ + [ + 5.294990460101518, + 4.687705558241064, + 7.15239687398372, + 7.056277354255535, + 4.836621026089924, + 4.606203323283599, + 4.476283581464221, + 4.4513527353179505, + 5.505522083738992 + ], + [ + 13.375814667564757, + 13.234386523239749, + 13.962318060375573, + 14.47242477721307, + 14.680861756879459, + 14.944545542008466, + 14.546485099539886, + 12.898782981988798, + 11.774378159344677 + ], + [ + 19.453436963657346, + 18.773763229989346, + 15.7382856333261, + 11.788681629922612, + 11.315202779808523, + 13.41549683555196, + 15.396491568239512, + 18.668470174410317, + 17.65413081367002 + ] + ], + "Image to Spatial": [ + [ + 5.399685549299138, + 4.816675552115289, + 7.641548903848636, + 7.855560444625053, + 5.314916078156076, + 4.863921460742268, + 4.585930784612097, + 4.6535108992860845, + 5.78072840942011 + ], + [ + 15.028813235733114, + 13.968520558761492, + 15.350564189566917, + 15.346538452591087, + 15.514240646162706, + 15.507050971670694, + 15.553893947514421, + 14.286480610504693, + 14.269466348586892 + ], + [ + 27.897930807565523, + 24.26770806636389, + 18.894550278738468, + 13.600079956657346, + 12.013564755866623, + 21.007029393784368, + 20.871187088270126, + 24.378951406104598, + 20.072858575521476 + ] + ], + "Source to Interference": [ + [ + 16.288298722144038, + 13.11843104098601, + 14.93028616587486, + 13.2649721932521, + 11.365054983910273, + 11.200328214591442, + 13.565470544044487, + 10.467023396120922, + 13.865383757870347 + ], + [ + 19.513039699388695, + 22.42707966527728, + 21.007411139412852, + 23.300468118797344, + 23.734193134223283, + 25.514168159637173, + 22.77531645692427, + 19.87431171391975, + 16.583023375565034 + ], + [ + 20.317548379871347, + 20.345012200602774, + 18.56231909329937, + 16.2695504711067, + 19.241209935568143, + 14.207980823648864, + 16.920950527564614, + 19.973207276296236, + 21.362175129090893 + ] + ], + "Source to Artifact": [ + [ + 32.922354537610794, + 30.11196661488308, + 35.72247463305713, + 32.12060552923858, + 28.623592081799295, + 30.825308079137642, + 30.870941012978133, + 30.30003772490787, + 27.664459350203707 + ], + [ + 30.40377049649575, + 39.02918663674912, + 36.48058577529872, + 38.66653003496973, + 37.886134635059214, + 42.00145670488575, + 40.81708087807754, + 35.50687207789059, + 32.66233065310512 + ], + [ + 34.408370059844664, + 37.84121390962211, + 36.78854469136054, + 33.541894094549335, + 32.19879667507221, + 38.33727532234484, + 37.551076539971504, + 39.21650683048246, + 37.56168803523778 + ] + ], + "Source permutation": [ + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ], + [ + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0 + ], + [ + 2.0, + 2.0, + 2.0, + 2.0, + 2.0, + 2.0, + 2.0, + 2.0, + 2.0 + ] + ], + "win": 1100, + "hop": 850, + "nchan": 4, + "gain": 1.0, + "reverse": false } } diff --git a/tests/data/separation/output09.json b/tests/data/separation/output09.json index 5975c2cc..735752c8 100644 --- a/tests/data/separation/output09.json +++ b/tests/data/separation/output09.json @@ -103,5 +103,62 @@ "nchan": 2, "gain": 2.2, "reverse": false + }, + "Images Framewise": { + "Source to Distortion": [ + [ + -2.051176730267349, + -5.146884744328681, + -6.734284215137559, + -3.6310338903056136, + -4.122510730027927, + -4.167078355532121 + ] + ], + "Image to Spatial": [ + [ + -0.27238760025916553, + -4.020905870109551, + -6.301402520259074, + -2.852803081793685, + -3.718817899898826, + -3.225307329367855 + ] + ], + "Source to Interference": [ + [ + Infinity, + Infinity, + Infinity, + Infinity, + Infinity, + Infinity + ] + ], + "Source to Artifact": [ + [ + 8.08886938787347, + 5.948179995182407, + 8.011113169865057, + 8.942785959170472, + 11.216100461431367, + 7.379612746411304 + ] + ], + "Source permutation": [ + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + ], + "win": 1500, + "hop": 1200, + "nchan": 2, + "gain": 2.2, + "reverse": false } } From b59109f4c5d2aca474e4488046f55c82e2e8cc49 Mon Sep 17 00:00:00 2001 From: ErikJohnsonCU Date: Tue, 26 Jul 2016 13:41:57 +0200 Subject: [PATCH 10/19] Updating the test cases failing due to numerical precision differences --- tests/data/separation/output00.json | 24 +++++----- tests/data/separation/output04.json | 66 +++++++++++++------------- tests/data/separation/output05.json | 72 ++++++++++++++--------------- 3 files changed, 81 insertions(+), 81 deletions(-) diff --git a/tests/data/separation/output00.json b/tests/data/separation/output00.json index 1c704ec0..a2797688 100644 --- a/tests/data/separation/output00.json +++ b/tests/data/separation/output00.json @@ -181,30 +181,30 @@ ], "Source to Interference": [ [ - 9.758854746145582, - 11.253811991113311 + 9.760140854576726, + 11.253796559312175 ], [ - 6.189932955202918, - 5.7447815523011965 + 6.201456318343639, + 5.744776282225366 ], [ - 16.628665368962928, - 14.244460824190718 + 16.629136350117925, + 14.244627662024063 ] ], "Source to Artifact": [ [ - 13.066432617004098, - 13.544201213948446 + 13.068812610292191, + 13.544244494591254 ], [ - 7.654747815679217, - 4.918165618459598 + 7.667113048185911, + 4.918164884150128 ], [ - 16.425802018734363, - 10.663099187584482 + 16.42626089692001, + 10.663060640768771 ] ], "Source permutation": [ diff --git a/tests/data/separation/output04.json b/tests/data/separation/output04.json index 7f0d56b2..bb783ee8 100644 --- a/tests/data/separation/output04.json +++ b/tests/data/separation/output04.json @@ -324,43 +324,43 @@ ], "Source to Artifact": [ [ - 21.941634743045867, - 8.160150549904461, - 33.89413949508541, - 23.097988721367663, - 19.63258455512275, - 16.229520324254942, - 15.374106790710806, - 19.932867195659153, - 24.069435289802104, - 23.478600044968356, - 33.94655039984599 + 21.942007595846636, + 8.160150550216235, + 33.89414018446966, + 23.0979877586458, + 19.632584512018106, + 16.22952036038512, + 15.374106846396673, + 19.932877717535888, + 24.069435069433286, + 23.478601025338705, + 33.94655098971913 ], [ - 17.870916311035113, - 21.09708482122684, - 23.724227713210038, - 20.2793040331052, - 26.161101365641585, - 23.79121658145224, - 24.97879999406802, - 27.542081409592928, - 29.381619250118447, - 24.03745708932051, - 32.436190166006 + 17.87105578872931, + 21.09708482124905, + 23.72422771800908, + 20.279304047902144, + 26.161101322287244, + 23.7912164764684, + 24.978800022990892, + 27.542082727980755, + 29.381619241679257, + 24.037372494041346, + 32.436190638932246 ], [ - 16.472644196494972, - 19.531896640021277, - 20.564398949037034, - 23.21705335442989, - 28.766682637653563, - 27.569054386194708, - 22.30178126373824, - 24.435552042622653, - 32.55743586341363, - 24.53288460782584, - 30.373462422534875 + 16.472669681119967, + 19.531896640326615, + 20.56439900285278, + 23.21705186451024, + 28.766682631719, + 27.56905439032519, + 22.30178125193524, + 24.435558919331367, + 32.55743586853404, + 24.532885550414566, + 30.373463245660336 ] ], "Source permutation": [ diff --git a/tests/data/separation/output05.json b/tests/data/separation/output05.json index 169d2c5c..b5ba7144 100644 --- a/tests/data/separation/output05.json +++ b/tests/data/separation/output05.json @@ -205,54 +205,54 @@ ], "Source to Interference": [ [ - 12.765249358380775, - 18.548198183998743, - 21.569416698088144, - 21.727537677331597, - 25.074504410436198, - 19.402044610245785 + 12.765247987217723, + 18.548198326401238, + 21.56942205365922, + 21.727536058601494, + 25.074504242651123, + 19.402046376019406 ], [ - 3.7592947147237785, - 2.9643292422894167, - 3.452116466887226, - 8.899907126021503, - -0.013364077846654426, - 4.022713791128474 + 3.7592969952118938, + 2.9643294210871796, + 3.4521164707672103, + 8.89989960878802, + -0.013368601758496676, + 4.022718272413978 ], [ - 13.999736036820355, - 12.840068935705089, - 7.855245399766267, - 2.0128900158477583, - 13.254460388413138, - 14.258924158864893 + 13.999773826767068, + 12.840068959398272, + 7.855283150243267, + 2.0128880192086265, + 13.254450179478315, + 14.258939821646521 ] ], "Source to Artifact": [ [ - 17.46646353982129, - 30.644492294757285, - 31.818177532765706, - 31.403875117839682, - 29.74250631357192, - 25.761011954998366 + 17.466581324467473, + 30.64449260447506, + 31.818219899436677, + 31.403889961649718, + 29.742506431757878, + 25.76104133124133 ], [ - 13.907474926809986, - 19.286311719640786, - 18.04982905161036, - 21.324899980967157, - 8.41500346678665, - 12.911722511535594 + 13.90751663604565, + 19.286311163564886, + 18.04982577022389, + 21.32488824647362, + 8.415006032654246, + 12.91174006255146 ], [ - 20.679963242054285, - 26.253638565170796, - 20.398063822188437, - 14.984999356426009, - 16.75512438509712, - 21.923413760164983 + 20.67996907702124, + 26.253639802519878, + 20.39833802217094, + 14.985002236348938, + 16.75512467904216, + 21.9234510210249 ] ], "Source permutation": [ From 4d2be07cdda8c312fc4f184f444be5892f4a5872 Mon Sep 17 00:00:00 2001 From: ErikJohnsonCU Date: Thu, 28 Jul 2016 09:27:36 +0200 Subject: [PATCH 11/19] Consolidated a test case; added error checks on metric; moved a function --- tests/test_separation.py | 65 +++++++++++++++++++--------------------- 1 file changed, 30 insertions(+), 35 deletions(-) diff --git a/tests/test_separation.py b/tests/test_separation.py index 40df5e0a..0463193b 100644 --- a/tests/test_separation.py +++ b/tests/test_separation.py @@ -51,6 +51,10 @@ def __generate_multichannel(mono_sig, nchan=2, gain=1.0, reverse=False): return np.dstack(stackin) +def __check_score(sco_f, metric, score, expected_score): + assert np.allclose(score, expected_score, atol=A_TOL) + + def __unit_test_empty_input(metric): if (metric == mir_eval.separation.bss_eval_sources or metric == mir_eval.separation.bss_eval_images): @@ -74,7 +78,8 @@ def __unit_test_empty_input(metric): def __unit_test_silent_input(metric): # Test for error when there is a silent reference/estimated source - if metric == mir_eval.separation.bss_eval_images: + if (metric == mir_eval.separation.bss_eval_images or + metric == mir_eval.separation.bss_eval_images_framewise): ref_sources = np.vstack((np.zeros((1, 100, 2)), np.random.random_sample((2, 100, 2)))) est_sources = np.vstack((np.zeros((1, 100, 2)), @@ -90,11 +95,14 @@ def __unit_test_silent_input(metric): est_sources[1:]) nose.tools.assert_raises(ValueError, metric, ref_sources[1:], est_sources[:2]) - elif metric == mir_eval.separation.bss_eval_sources_framewise: + elif (metric == mir_eval.separation.bss_eval_sources_framewise or + metric == mir_eval.separation.bss_eval_images_framewise): nose.tools.assert_raises(ValueError, metric, ref_sources[:2], est_sources[1:], 40, 20) nose.tools.assert_raises(ValueError, metric, ref_sources[1:], est_sources[:2], 40, 20) + else: + raise ValueError('Unknown metric {}'.format(metric)) def __unit_test_incompatible_shapes(metric): @@ -115,9 +123,12 @@ def __unit_test_incompatible_shapes(metric): metric == mir_eval.separation.bss_eval_images_framewise): args1 = [sources_3, sources_4, 40, 20] args2 = [sources_4, sources_3, 40, 20] + else: + raise ValueError('Unknown metric {}'.format(metric)) nose.tools.assert_raises(ValueError, metric, *args1) nose.tools.assert_raises(ValueError, metric, *args2) - if metric == mir_eval.separation.bss_eval_images: + if (metric == mir_eval.separation.bss_eval_images or + metric == mir_eval.separation.bss_eval_images_framewise): nose.tools.assert_raises(ValueError, metric, sources_4, sources_4_chan) @@ -148,6 +159,8 @@ def __unit_test_default_permutation(metric): elif metric == mir_eval.separation.bss_eval_images: ref_sources = np.random.random_sample((4, 100, 2)) est_sources = np.random.random_sample((4, 100, 2)) + else: + raise ValueError('Unknown metric {}'.format(metric)) results = metric(ref_sources, est_sources, compute_permutation=False) assert np.array_equal(results[-1], np.asarray([0, 1, 2, 3])) @@ -157,39 +170,21 @@ def __unit_test_framewise_small_window(metric): if metric == mir_eval.separation.bss_eval_sources_framewise: ref_sources = np.random.random_sample((4, 100)) est_sources = np.random.random_sample((4, 100)) - # Test with window larger than source length - assert np.allclose(metric(ref_sources, est_sources, - window=120, hop=20), - mir_eval.separation.bss_eval_sources(ref_sources, - est_sources, - False), - atol=A_TOL) - # Test with hop larger than source length - assert np.allclose(metric(ref_sources, est_sources, - window=20, hop=120), - mir_eval.separation.bss_eval_sources(ref_sources, - est_sources, - False), - atol=A_TOL) + comparison_fcn = mir_eval.separation.bss_eval_sources elif metric == mir_eval.separation.bss_eval_images_framewise: - ref_images = np.random.random_sample((4, 100, 2)) - est_images = np.random.random_sample((4, 100, 2)) - # Test with window larger than source length - assert np.allclose(metric(ref_images, est_images, window=120, hop=20), - mir_eval.separation.bss_eval_images(ref_images, - est_images, - False), - atol=A_TOL) - # Test with hop larger than source length - assert np.allclose(metric(ref_images, est_images, window=20, hop=120), - mir_eval.separation.bss_eval_images(ref_images, - est_images, - False), - atol=A_TOL) - - -def __check_score(sco_f, metric, score, expected_score): - assert np.allclose(score, expected_score, atol=A_TOL) + ref_sources = np.random.random_sample((4, 100, 2)) + est_sources = np.random.random_sample((4, 100, 2)) + comparison_fcn = mir_eval.separation.bss_eval_images + else: + raise ValueError('Unknown metric {}'.format(metric)) + # Test with window larger than source length + assert np.allclose(metric(ref_sources, est_sources, window=120, hop=20), + comparison_fcn(ref_sources, est_sources, False), + atol=A_TOL) + # Test with hop larger than source length + assert np.allclose(metric(ref_sources, est_sources, window=20, hop=120), + comparison_fcn(ref_sources, est_sources, False), + atol=A_TOL) def test_separation_functions(): From 8fe9de5fc6fe295fd4174079cf9f1e708433cecb Mon Sep 17 00:00:00 2001 From: ErikJohnsonCU Date: Thu, 28 Jul 2016 09:42:58 +0200 Subject: [PATCH 12/19] Ensured return type of framewise functions matches docstring --- mir_eval/separation.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/mir_eval/separation.py b/mir_eval/separation.py index 38827f83..79c78a3f 100644 --- a/mir_eval/separation.py +++ b/mir_eval/separation.py @@ -291,9 +291,10 @@ def bss_eval_sources_framewise(reference_sources, estimated_sources, ) # if fewer than 2 windows would be evaluated, return the sources result if nwin < 2: - return bss_eval_sources(reference_sources, + result = bss_eval_sources(reference_sources, estimated_sources, compute_permutation) + return [np.expand_dims(score, -1) for score in result] # compute the criteria across all windows sdr = np.empty((nsrc, nwin)) @@ -513,9 +514,10 @@ def bss_eval_images_framewise(reference_sources, estimated_sources, ) # if fewer than 2 windows would be evaluated, return the images result if nwin < 2: - return bss_eval_images(reference_sources, - estimated_sources, - compute_permutation) + result = bss_eval_images(reference_sources, + estimated_sources, + compute_permutation) + return [np.expand_dims(score, -1) for score in result] # compute the criteria across all windows sdr = np.empty((nsrc, nwin)) From 509377a58b41b5c367a0fa05257645189781b2bc Mon Sep 17 00:00:00 2001 From: ErikJohnsonCU Date: Thu, 28 Jul 2016 09:46:29 +0200 Subject: [PATCH 13/19] Added a squeeze to deal with single dimension in testing --- tests/test_separation.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/test_separation.py b/tests/test_separation.py index 0463193b..9b8adb1d 100644 --- a/tests/test_separation.py +++ b/tests/test_separation.py @@ -178,11 +178,17 @@ def __unit_test_framewise_small_window(metric): else: raise ValueError('Unknown metric {}'.format(metric)) # Test with window larger than source length - assert np.allclose(metric(ref_sources, est_sources, window=120, hop=20), + assert np.allclose(np.squeeze(metric(ref_sources, + est_sources, + window=120, + hop=20)), comparison_fcn(ref_sources, est_sources, False), atol=A_TOL) # Test with hop larger than source length - assert np.allclose(metric(ref_sources, est_sources, window=20, hop=120), + assert np.allclose(np.squeeze(metric(ref_sources, + est_sources, + window=20, + hop=120)), comparison_fcn(ref_sources, est_sources, False), atol=A_TOL) From 2cdd9fb5dcc8191a4a3144a1d521c565b0c823e6 Mon Sep 17 00:00:00 2001 From: ErikJohnsonCU Date: Thu, 28 Jul 2016 10:09:00 +0200 Subject: [PATCH 14/19] pep8 fix --- mir_eval/separation.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mir_eval/separation.py b/mir_eval/separation.py index 79c78a3f..36c32972 100644 --- a/mir_eval/separation.py +++ b/mir_eval/separation.py @@ -292,8 +292,8 @@ def bss_eval_sources_framewise(reference_sources, estimated_sources, # if fewer than 2 windows would be evaluated, return the sources result if nwin < 2: result = bss_eval_sources(reference_sources, - estimated_sources, - compute_permutation) + estimated_sources, + compute_permutation) return [np.expand_dims(score, -1) for score in result] # compute the criteria across all windows From afbdb25697e059e46105b9732af918841e84564a Mon Sep 17 00:00:00 2001 From: ErikJohnsonCU Date: Thu, 28 Jul 2016 13:29:32 +0200 Subject: [PATCH 15/19] Corrected shape in images framewise docstring --- mir_eval/separation.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mir_eval/separation.py b/mir_eval/separation.py index 36c32972..40094c2e 100644 --- a/mir_eval/separation.py +++ b/mir_eval/separation.py @@ -463,10 +463,10 @@ def bss_eval_images_framewise(reference_sources, estimated_sources, Parameters ---------- - reference_sources : np.ndarray, shape=(nsrc, nsampl) + reference_sources : np.ndarray, shape=(nsrc, nsampl, nchan) matrix containing true sources (must have the same shape as estimated_sources) - estimated_sources : np.ndarray, shape=(nsrc, nsampl) + estimated_sources : np.ndarray, shape=(nsrc, nsampl, nchan) matrix containing estimated sources (must have the same shape as reference_sources) window : int From 786b3450b97f20ce668ef7a8d7b24293c1cdd800 Mon Sep 17 00:00:00 2001 From: ErikJohnsonCU Date: Thu, 28 Jul 2016 13:37:51 +0200 Subject: [PATCH 16/19] Added a note to the images framewise function --- mir_eval/separation.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mir_eval/separation.py b/mir_eval/separation.py index 40094c2e..4d30d1f7 100644 --- a/mir_eval/separation.py +++ b/mir_eval/separation.py @@ -448,6 +448,11 @@ def bss_eval_images_framewise(reference_sources, estimated_sources, compute_permutation=False): """Framewise computation of bss_eval_images + NOTE: if reference_sources and estimated_sources would be evaluated using + only a single window or are shorter than the window length, the result + of bss_eval_sources called on reference_sources and estimated_sources (with + the compute_permutation parameter passed to bss_eval_sources) is returned + Examples -------- >>> # reference_sources[n] should be an ndarray of samples of the From 927835d5fba4e22d725c041c05aa1285957d346d Mon Sep 17 00:00:00 2001 From: ErikJohnsonCU Date: Thu, 28 Jul 2016 13:40:24 +0200 Subject: [PATCH 17/19] Clarified the compute_permutation comment in docstring and added it to bss_eval_sources --- mir_eval/separation.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/mir_eval/separation.py b/mir_eval/separation.py index 4d30d1f7..234799ee 100644 --- a/mir_eval/separation.py +++ b/mir_eval/separation.py @@ -124,6 +124,10 @@ def bss_eval_sources(reference_sources, estimated_sources, The decomposition allows a time-invariant filter distortion of length 512, as described in Section III.B of [#vincent2006performance]_. + Passing False for compute_permutation will improve the computation + performance of the evaluation; however, it is not always appropriate and + is not the way that the BSS_EVAL Matlab toolbox computes bss_eval_images. + Examples -------- >>> # reference_sources[n] should be an ndarray of samples of the @@ -326,9 +330,9 @@ def bss_eval_images(reference_sources, estimated_sources, The decomposition allows a time-invariant filter distortion of length 512, as described in Section III.B of [#vincent2006performance]_. - Passing True for compute_permutation will much improve the performance of - the evaluation; however, it is not always appropriate and is not the - way that the BSS_EVAL Matlab toolbox computes bss_eval_images. + Passing False for compute_permutation will improve the computation + performance of the evaluation; however, it is not always appropriate and + is not the way that the BSS_EVAL Matlab toolbox computes bss_eval_images. Examples -------- From 0bd9c67c9a4df240a2034fe63c58dc4c3107d2ce Mon Sep 17 00:00:00 2001 From: ErikJohnsonCU Date: Thu, 28 Jul 2016 16:12:09 +0200 Subject: [PATCH 18/19] Added reference in bss_eval_sources and bss_eval_images functions --- mir_eval/separation.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/mir_eval/separation.py b/mir_eval/separation.py index 234799ee..8bdaf2f8 100644 --- a/mir_eval/separation.py +++ b/mir_eval/separation.py @@ -128,6 +128,13 @@ def bss_eval_sources(reference_sources, estimated_sources, performance of the evaluation; however, it is not always appropriate and is not the way that the BSS_EVAL Matlab toolbox computes bss_eval_images. + Further implementation details: + Emmanuel Vincent, Shoko Araki, Fabian J. Theis, Guido Nolte, Pau Bofill, + Hiroshi Sawada, Alexey Ozerov, B. Vikrham Gowreesunker, Dominik Lutter + and Ngoc Q.K. Duong, "The Signal Separation Evaluation Campaign + (2007-2010): Achievements and remaining challenges", Signal Processing, + 92, pp. 1928-1936, 2012. + Examples -------- >>> # reference_sources[n] should be an ndarray of samples of the @@ -334,6 +341,13 @@ def bss_eval_images(reference_sources, estimated_sources, performance of the evaluation; however, it is not always appropriate and is not the way that the BSS_EVAL Matlab toolbox computes bss_eval_images. + Further implementation details: + Emmanuel Vincent, Shoko Araki, Fabian J. Theis, Guido Nolte, Pau Bofill, + Hiroshi Sawada, Alexey Ozerov, B. Vikrham Gowreesunker, Dominik Lutter + and Ngoc Q.K. Duong, "The Signal Separation Evaluation Campaign + (2007-2010): Achievements and remaining challenges", Signal Processing, + 92, pp. 1928-1936, 2012. + Examples -------- >>> # reference_sources[n] should be an ndarray of samples of the From c53febfafceccbab14cb8e55a2c643511152bd64 Mon Sep 17 00:00:00 2001 From: ErikJohnsonCU Date: Thu, 4 Aug 2016 14:42:13 +0200 Subject: [PATCH 19/19] Updated framewise function docstrings with comment on permutations --- mir_eval/separation.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/mir_eval/separation.py b/mir_eval/separation.py index 8bdaf2f8..b8ee941a 100644 --- a/mir_eval/separation.py +++ b/mir_eval/separation.py @@ -233,6 +233,14 @@ def bss_eval_sources_framewise(reference_sources, estimated_sources, compute_permutation=False): """Framewise computation of bss_eval_sources + Please be aware that this function does not compute permutations (by + default) on the possible relations between reference_sources and + estimated_sources due to the dangers of a changing permutation. Therefore + (by default), it assumes that reference_sources[i] corresponds to + estimated_sources[i]. To enable computing permutations please set + compute_permutation to be True and check that the returned perm is + identical for all windows. + NOTE: if reference_sources and estimated_sources would be evaluated using only a single window or are shorter than the window length, the result of bss_eval_sources called on reference_sources and estimated_sources (with @@ -466,6 +474,14 @@ def bss_eval_images_framewise(reference_sources, estimated_sources, compute_permutation=False): """Framewise computation of bss_eval_images + Please be aware that this function does not compute permutations (by + default) on the possible relations between reference_sources and + estimated_sources due to the dangers of a changing permutation. Therefore + (by default), it assumes that reference_sources[i] corresponds to + estimated_sources[i]. To enable computing permutations please set + compute_permutation to be True and check that the returned perm is + identical for all windows. + NOTE: if reference_sources and estimated_sources would be evaluated using only a single window or are shorter than the window length, the result of bss_eval_sources called on reference_sources and estimated_sources (with