{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# `mcsm-benchs`: Using user-provided signals and performance metric\n", "\n", "`mcsm-benchs` can be helpful to create benchmarks with signals and performance metrics provided by the user.\n", "This can be useful, for instance, when dealing with real-world signals and performance metrics that do not need a noiseless version of the signal.\n", "\n", "In this notebook, we create a benchmark with real-world audio signals and a performance metric that is computed based on the original signal and the processed one.\n" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [], "source": [ "import numpy as np\n", "from numpy import pi as pi\n", "import pandas as pd\n", "from matplotlib import pyplot as plt\n", "from mcsm_benchs.Benchmark import Benchmark\n", "from mcsm_benchs.ResultsInterpreter import ResultsInterpreter\n", "from mcsm_benchs.SignalBank import SignalBank\n", "from utils import spectrogram_thresholding, get_stft\n", "\n", "from IPython.display import Audio" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 1. Creating a dictionary of methods\n", "\n", "Let's create a dictionary of methods to benchmark. As as example, we will compare two strategies for spectrogram thresholding.\n", "The first one is hard thresholding, in which the thresholding function is defined as:\n", "The second one is soft thresholding, here defined as:\n", "\n", "These two approaches are implemented in the python function ```thresholding(signal, lam, fun='hard')``` function, which receives a signal to clean, a positional argument ```lam``` and a keyword argument ```fun``` that can be either ```hard``` or ```soft```.\n", " \n", "Our dictionary of methods will consist then in two methods: hard thresholding and soft thresholding.\n", "For both approaches, let's use a value of ```lam=1.0``` for now." ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [], "source": [ "\n", "def method_1(noisy_signal, *args, **kwargs):\n", " # If additional input parameters are needed, they can be passed in a tuple using \n", " # *args or **kwargs and then parsed.\n", " xr = spectrogram_thresholding(noisy_signal,1.0,fun='hard')\n", " return xr\n", "\n", "def method_2(noisy_signal, *args, **kwargs):\n", " # If additional input parameters are needed, they can be passed in a tuple using \n", " # *args or **kwargs and then parsed.\n", " xr = spectrogram_thresholding(noisy_signal,2.0,fun='soft') \n", " return xr\n", "\n", "# Create a dictionary of the methods to test.\n", "my_methods = {\n", " 'Hard_Thr': method_1, \n", " 'Soft_Thr': method_2,\n", " }" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 2. Creating a dictionary of user-provided signals\n", "\n", "We load two synthesized speech signals, and fix the length to `N=2**13` samples.\n", "With these signals, we create a dictionary, where the key is going to be used as an identifier of the signal in the benchmark final results." ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [], "source": [ "# Loading signals and creating dictionary\n", "N = 2**13\n", "signals_dic = {\n", " 'speech_1': np.loadtxt('6_female.csv')[0:N],\n", " 'speech_2': np.loadtxt('6_male.csv')[0:N]\n", " }" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", " \n", " " ], "text/plain": [ "" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# Listen to the signals\n", "fs = 16000\n", "Audio(signals_dic['speech_2'], rate=fs)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 3. Defining a performance metric\n", "\n", "We use the Perceptual Evaluation of Speech Quality (PESQ) metric as a performance metric.\n", "\n", "To do this, we first create a wrapper `perf_fun(...)` of the function `pesq(...)`.\n", "Performarmance metrics must follow the signature `perf_fun(x, xest, **kwargs)`, where\n", "- `x` is the original signal (without added noise).\n", "- `xest` is the output of a denoising approach.\n", "- `**kwargs` is used to receive a number of extra parameters passed by the benchmark class when the function `perf_fun(...)` is called." ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "1.0" ] }, "execution_count": 8, "metadata": {}, "output_type": "execute_result" } ], "source": [ "from pesq import pesq\n", "# Create a wrapper function for PESQ.\n", "# Normalize by the PESQ of the original signal.\n", "perfuns = {'pesq1':lambda x,xest,**kwargs: pesq(fs,x,xest,'nb')/pesq(fs,x,x,'nb'),\n", " 'pesq2':lambda x,xest,**kwargs: pesq(fs,x,xest,'nb'),}\n", "perfuns['pesq1'](signals_dic['speech_1'],signals_dic['speech_1'])" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Now we are ready to instantiate a `Benchmark` object and run a test using the proposed methods and parameters. The benchmark constructor receives a name of a task (which defines the performance function of the test), a dictionary of the methods to test, the desired length of the signals used in the simulation, a dictionary of different parameters that should be passed to the methods, an array with different values of SNR to test, and the number of repetitions that should be used for each test. Once the object is created, use the class method `run_test()` to start the experiments.\n", "\n", "*Remark 1: You can use the ```verbosity``` parameter to show less or more messages during the progress of the experiments. There are 6 levels of verbosity, from ```verbosity=0``` (indicate just the start and the end of the experiments) to ```verbostiy = 5``` (show each method and parameter progress)*\n", "\n", "*Remark 2: Parallelize the experiments is also possible by passing the parameter ```parallelize = True```. *" ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Running benchmark...\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "100%|██████████| 3/3 [00:03<00:00, 1.21s/it]\n", "100%|██████████| 3/3 [00:03<00:00, 1.07s/it]\n" ] } ], "source": [ "benchmark = Benchmark(task = 'denoising',\n", " N = N,\n", " methods = my_methods, \n", " SNRin = [0,10,20], \n", " repetitions = 10,\n", " signal_ids=signals_dic, # Input user-defined signals\n", " verbosity=0,\n", " obj_fun=perfuns, # Define a performance metric\n", " )\n", " \n", "results_dic=benchmark.run() # Run the benchmark" ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [ { "data": { "application/vnd.microsoft.datawrangler.viewer.v0+json": { "columns": [ { "name": "index", "rawType": "int64", "type": "integer" }, { "name": "Method", "rawType": "object", "type": "string" }, { "name": "Parameter", "rawType": "object", "type": "string" }, { "name": "Signal_id", "rawType": "object", "type": "string" }, { "name": "Repetition", "rawType": "int64", "type": "integer" }, { "name": "0", "rawType": "float64", "type": "float" }, { "name": "10", "rawType": "float64", "type": "float" }, { "name": "20", "rawType": "float64", "type": "float" } ], "conversionMethod": "pd.DataFrame", "ref": "c3aa84e4-d375-411c-9c2f-e9e9467ee13b", "rows": [ [ "40", "Hard_Thr", "((), {})", "speech_1", "0", "1.088252305984497", "1.4201626777648926", "2.316756248474121" ], [ "41", "Hard_Thr", "((), {})", "speech_1", "1", "1.0934972763061523", "1.4408046007156372", "2.4149160385131836" ], [ "42", "Hard_Thr", "((), {})", "speech_1", "2", "1.0854753255844116", "1.4442657232284546", "2.3834280967712402" ], [ "43", "Hard_Thr", "((), {})", "speech_1", "3", "1.0844477415084839", "1.4300222396850586", "2.3095014095306396" ], [ "44", "Hard_Thr", "((), {})", "speech_1", "4", "1.0884238481521606", "1.4676872491836548", "2.410154104232788" ], [ "45", "Hard_Thr", "((), {})", "speech_1", "5", "1.082132339477539", "1.4230505228042603", "2.281771421432495" ], [ "46", "Hard_Thr", "((), {})", "speech_1", "6", "1.1162354946136475", "1.5638952255249023", "2.5827765464782715" ], [ "47", "Hard_Thr", "((), {})", "speech_1", "7", "1.0995392799377441", "1.5001294612884521", "2.494778871536255" ], [ "48", "Hard_Thr", "((), {})", "speech_1", "8", "1.118208646774292", "1.5957214832305908", "2.7281980514526367" ], [ "49", "Hard_Thr", "((), {})", "speech_1", "9", "1.093117356300354", "1.4787007570266724", "2.5309834480285645" ], [ "60", "Hard_Thr", "((), {})", "speech_2", "0", "1.1423429250717163", "1.5649162530899048", "2.7233963012695312" ], [ "61", "Hard_Thr", "((), {})", "speech_2", "1", "1.1195447444915771", "1.5034854412078857", "2.566995620727539" ], [ "62", "Hard_Thr", "((), {})", "speech_2", "2", "1.1279807090759277", "1.538451075553894", "2.6909079551696777" ], [ "63", "Hard_Thr", "((), {})", "speech_2", "3", "1.132774829864502", "1.5284581184387207", "2.68407940864563" ], [ "64", "Hard_Thr", "((), {})", "speech_2", "4", "1.148443579673767", "1.618736743927002", "2.7857391834259033" ], [ "65", "Hard_Thr", "((), {})", "speech_2", "5", "1.1286216974258423", "1.544001579284668", "2.7128565311431885" ], [ "66", "Hard_Thr", "((), {})", "speech_2", "6", "1.1422004699707031", "1.637576937675476", "2.893669843673706" ], [ "67", "Hard_Thr", "((), {})", "speech_2", "7", "1.135804295539856", "1.6201083660125732", "2.9238059520721436" ], [ "68", "Hard_Thr", "((), {})", "speech_2", "8", "1.1628708839416504", "1.6910293102264404", "3.0214061737060547" ], [ "69", "Hard_Thr", "((), {})", "speech_2", "9", "1.1408934593200684", "1.6020331382751465", "2.900660276412964" ], [ "50", "Soft_Thr", "((), {})", "speech_1", "0", "1.603140950202942", "2.514249086380005", "3.585965633392334" ], [ "51", "Soft_Thr", "((), {})", "speech_1", "1", "1.6848340034484863", "2.5231692790985107", "3.656338930130005" ], [ "52", "Soft_Thr", "((), {})", "speech_1", "2", "1.6007087230682373", "2.4177064895629883", "3.6167256832122803" ], [ "53", "Soft_Thr", "((), {})", "speech_1", "3", "1.5973451137542725", "2.612795114517212", "3.5188703536987305" ], [ "54", "Soft_Thr", "((), {})", "speech_1", "4", "1.6161836385726929", "2.6622891426086426", "3.5719614028930664" ], [ "55", "Soft_Thr", "((), {})", "speech_1", "5", "1.4298336505889893", "2.302718162536621", "3.5348238945007324" ], [ "56", "Soft_Thr", "((), {})", "speech_1", "6", "1.6649541854858398", "2.593343496322632", "3.627356767654419" ], [ "57", "Soft_Thr", "((), {})", "speech_1", "7", "1.5404071807861328", "2.2859041690826416", "3.5640995502471924" ], [ "58", "Soft_Thr", "((), {})", "speech_1", "8", "1.5308319330215454", "2.4137256145477295", "3.6679325103759766" ], [ "59", "Soft_Thr", "((), {})", "speech_1", "9", "1.5807113647460938", "2.2893879413604736", "3.050673007965088" ], [ "70", "Soft_Thr", "((), {})", "speech_2", "0", "1.7368583679199219", "2.8953075408935547", "3.5835580825805664" ], [ "71", "Soft_Thr", "((), {})", "speech_2", "1", "1.7840569019317627", "2.8154115676879883", "3.5237953662872314" ], [ "72", "Soft_Thr", "((), {})", "speech_2", "2", "1.8165462017059326", "3.0099735260009766", "3.5584914684295654" ], [ "73", "Soft_Thr", "((), {})", "speech_2", "3", "1.8111028671264648", "3.057044744491577", "3.592641830444336" ], [ "74", "Soft_Thr", "((), {})", "speech_2", "4", "1.7999805212020874", "2.716383457183838", "3.569941282272339" ], [ "75", "Soft_Thr", "((), {})", "speech_2", "5", "1.6246907711029053", "3.0139896869659424", "3.6378655433654785" ], [ "76", "Soft_Thr", "((), {})", "speech_2", "6", "1.8974900245666504", "2.854654312133789", "3.4270081520080566" ], [ "77", "Soft_Thr", "((), {})", "speech_2", "7", "1.5105435848236084", "2.5043632984161377", "3.5780460834503174" ], [ "78", "Soft_Thr", "((), {})", "speech_2", "8", "2.0005927085876465", "3.1368255615234375", "3.5498127937316895" ], [ "79", "Soft_Thr", "((), {})", "speech_2", "9", "1.992071270942688", "2.981548309326172", "3.4559719562530518" ] ], "shape": { "columns": 7, "rows": 40 } }, "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
MethodParameterSignal_idRepetition01020
40Hard_Thr((), {})speech_101.0882521.4201632.316756
41Hard_Thr((), {})speech_111.0934971.4408052.414916
42Hard_Thr((), {})speech_121.0854751.4442662.383428
43Hard_Thr((), {})speech_131.0844481.4300222.309501
44Hard_Thr((), {})speech_141.0884241.4676872.410154
45Hard_Thr((), {})speech_151.0821321.4230512.281771
46Hard_Thr((), {})speech_161.1162351.5638952.582777
47Hard_Thr((), {})speech_171.0995391.5001292.494779
48Hard_Thr((), {})speech_181.1182091.5957212.728198
49Hard_Thr((), {})speech_191.0931171.4787012.530983
60Hard_Thr((), {})speech_201.1423431.5649162.723396
61Hard_Thr((), {})speech_211.1195451.5034852.566996
62Hard_Thr((), {})speech_221.1279811.5384512.690908
63Hard_Thr((), {})speech_231.1327751.5284582.684079
64Hard_Thr((), {})speech_241.1484441.6187372.785739
65Hard_Thr((), {})speech_251.1286221.5440022.712857
66Hard_Thr((), {})speech_261.1422001.6375772.893670
67Hard_Thr((), {})speech_271.1358041.6201082.923806
68Hard_Thr((), {})speech_281.1628711.6910293.021406
69Hard_Thr((), {})speech_291.1408931.6020332.900660
50Soft_Thr((), {})speech_101.6031412.5142493.585966
51Soft_Thr((), {})speech_111.6848342.5231693.656339
52Soft_Thr((), {})speech_121.6007092.4177063.616726
53Soft_Thr((), {})speech_131.5973452.6127953.518870
54Soft_Thr((), {})speech_141.6161842.6622893.571961
55Soft_Thr((), {})speech_151.4298342.3027183.534824
56Soft_Thr((), {})speech_161.6649542.5933433.627357
57Soft_Thr((), {})speech_171.5404072.2859043.564100
58Soft_Thr((), {})speech_181.5308322.4137263.667933
59Soft_Thr((), {})speech_191.5807112.2893883.050673
70Soft_Thr((), {})speech_201.7368582.8953083.583558
71Soft_Thr((), {})speech_211.7840572.8154123.523795
72Soft_Thr((), {})speech_221.8165463.0099743.558491
73Soft_Thr((), {})speech_231.8111033.0570453.592642
74Soft_Thr((), {})speech_241.7999812.7163833.569941
75Soft_Thr((), {})speech_251.6246913.0139903.637866
76Soft_Thr((), {})speech_261.8974902.8546543.427008
77Soft_Thr((), {})speech_271.5105442.5043633.578046
78Soft_Thr((), {})speech_282.0005933.1368263.549813
79Soft_Thr((), {})speech_291.9920712.9815483.455972
\n", "
" ], "text/plain": [ " Method Parameter Signal_id Repetition 0 10 20\n", "40 Hard_Thr ((), {}) speech_1 0 1.088252 1.420163 2.316756\n", "41 Hard_Thr ((), {}) speech_1 1 1.093497 1.440805 2.414916\n", "42 Hard_Thr ((), {}) speech_1 2 1.085475 1.444266 2.383428\n", "43 Hard_Thr ((), {}) speech_1 3 1.084448 1.430022 2.309501\n", "44 Hard_Thr ((), {}) speech_1 4 1.088424 1.467687 2.410154\n", "45 Hard_Thr ((), {}) speech_1 5 1.082132 1.423051 2.281771\n", "46 Hard_Thr ((), {}) speech_1 6 1.116235 1.563895 2.582777\n", "47 Hard_Thr ((), {}) speech_1 7 1.099539 1.500129 2.494779\n", "48 Hard_Thr ((), {}) speech_1 8 1.118209 1.595721 2.728198\n", "49 Hard_Thr ((), {}) speech_1 9 1.093117 1.478701 2.530983\n", "60 Hard_Thr ((), {}) speech_2 0 1.142343 1.564916 2.723396\n", "61 Hard_Thr ((), {}) speech_2 1 1.119545 1.503485 2.566996\n", "62 Hard_Thr ((), {}) speech_2 2 1.127981 1.538451 2.690908\n", "63 Hard_Thr ((), {}) speech_2 3 1.132775 1.528458 2.684079\n", "64 Hard_Thr ((), {}) speech_2 4 1.148444 1.618737 2.785739\n", "65 Hard_Thr ((), {}) speech_2 5 1.128622 1.544002 2.712857\n", "66 Hard_Thr ((), {}) speech_2 6 1.142200 1.637577 2.893670\n", "67 Hard_Thr ((), {}) speech_2 7 1.135804 1.620108 2.923806\n", "68 Hard_Thr ((), {}) speech_2 8 1.162871 1.691029 3.021406\n", "69 Hard_Thr ((), {}) speech_2 9 1.140893 1.602033 2.900660\n", "50 Soft_Thr ((), {}) speech_1 0 1.603141 2.514249 3.585966\n", "51 Soft_Thr ((), {}) speech_1 1 1.684834 2.523169 3.656339\n", "52 Soft_Thr ((), {}) speech_1 2 1.600709 2.417706 3.616726\n", "53 Soft_Thr ((), {}) speech_1 3 1.597345 2.612795 3.518870\n", "54 Soft_Thr ((), {}) speech_1 4 1.616184 2.662289 3.571961\n", "55 Soft_Thr ((), {}) speech_1 5 1.429834 2.302718 3.534824\n", "56 Soft_Thr ((), {}) speech_1 6 1.664954 2.593343 3.627357\n", "57 Soft_Thr ((), {}) speech_1 7 1.540407 2.285904 3.564100\n", "58 Soft_Thr ((), {}) speech_1 8 1.530832 2.413726 3.667933\n", "59 Soft_Thr ((), {}) speech_1 9 1.580711 2.289388 3.050673\n", "70 Soft_Thr ((), {}) speech_2 0 1.736858 2.895308 3.583558\n", "71 Soft_Thr ((), {}) speech_2 1 1.784057 2.815412 3.523795\n", "72 Soft_Thr ((), {}) speech_2 2 1.816546 3.009974 3.558491\n", "73 Soft_Thr ((), {}) speech_2 3 1.811103 3.057045 3.592642\n", "74 Soft_Thr ((), {}) speech_2 4 1.799981 2.716383 3.569941\n", "75 Soft_Thr ((), {}) speech_2 5 1.624691 3.013990 3.637866\n", "76 Soft_Thr ((), {}) speech_2 6 1.897490 2.854654 3.427008\n", "77 Soft_Thr ((), {}) speech_2 7 1.510544 2.504363 3.578046\n", "78 Soft_Thr ((), {}) speech_2 8 2.000593 3.136826 3.549813\n", "79 Soft_Thr ((), {}) speech_2 9 1.992071 2.981548 3.455972" ] }, "execution_count": 10, "metadata": {}, "output_type": "execute_result" } ], "source": [ "results_df = benchmark.get_results_as_df() # This formats the results on a DataFrame\n", "results_df[1]" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Generating plots with the Results Interpreter." ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "config": { "linkText": "Export to plot.ly", "plotlyServerURL": "https://plot.ly", "showLink": false }, "data": [ { "alignmentgroup": "True", "error_x": { "array": [ "0", "10", "20" ] }, "error_y": { "array": [ 0.002079170165829647, 0.009577690152230978, 0.021776206193065084 ], "arrayminus": [ 0.0016648583471901846, 0.00796294057480379, 0.019044143349862486 ] }, "hovertemplate": "Method + Param=Hard_Thr
SNRin=%{x}
QRF=%{y}", "legendgroup": "Hard_Thr", "marker": { "color": "#636efa", "pattern": { "shape": "" } }, "name": "Hard_Thr", "offsetgroup": "Hard_Thr", "orientation": "v", "showlegend": true, "textposition": "auto", "type": "bar", "x": [ "0", "10", "20" ], "xaxis": "x", "y": [ 0.24071664500513984, 0.3245903240590969, 0.5375952623211248 ], "yaxis": "y" }, { "alignmentgroup": "True", "error_x": { "array": [ "0", "10", "20" ] }, "error_y": { "array": [ 0.009824579109789844, 0.020562138897386006, 0.01799444856982546 ], "arrayminus": [ 0.011296421806850199, 0.019880134426564333, 0.03151549978949986 ] }, "hovertemplate": "Method + Param=Soft_Thr
SNRin=%{x}
QRF=%{y}", "legendgroup": "Soft_Thr", "marker": { "color": "#EF553B", "pattern": { "shape": "" } }, "name": "Soft_Thr", "offsetgroup": "Soft_Thr", "orientation": "v", "showlegend": true, "textposition": "auto", "type": "bar", "x": [ "0", "10", "20" ], "xaxis": "x", "y": [ 0.34843286156701425, 0.5411573010527314, 0.7781394135726046 ], "yaxis": "y" } ], "layout": { "barmode": "group", "legend": { "title": { "text": "Method + Param" }, "tracegroupgap": 0 }, "template": { "data": { "bar": [ { "error_x": { "color": "#2a3f5f" }, "error_y": { "color": "#2a3f5f" }, "marker": { "line": { "color": "#E5ECF6", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "bar" } ], "barpolar": [ { "marker": { "line": { "color": "#E5ECF6", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "barpolar" } ], "carpet": [ { "aaxis": { "endlinecolor": "#2a3f5f", "gridcolor": "white", "linecolor": "white", "minorgridcolor": "white", "startlinecolor": "#2a3f5f" }, "baxis": { "endlinecolor": "#2a3f5f", "gridcolor": "white", "linecolor": "white", "minorgridcolor": "white", "startlinecolor": "#2a3f5f" }, "type": "carpet" } ], "choropleth": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "choropleth" } ], "contour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "contour" } ], "contourcarpet": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "contourcarpet" } ], "heatmap": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "heatmap" } ], "heatmapgl": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "heatmapgl" } ], "histogram": [ { "marker": { "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "histogram" } ], "histogram2d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "histogram2d" } ], "histogram2dcontour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "histogram2dcontour" } ], "mesh3d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "mesh3d" } ], "parcoords": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "parcoords" } ], "pie": [ { "automargin": true, "type": "pie" } ], "scatter": [ { "fillpattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 }, "type": "scatter" } ], "scatter3d": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatter3d" } ], "scattercarpet": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattercarpet" } ], "scattergeo": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergeo" } ], "scattergl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergl" } ], "scattermapbox": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattermapbox" } ], "scatterpolar": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolar" } ], "scatterpolargl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolargl" } ], "scatterternary": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterternary" } ], "surface": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "surface" } ], "table": [ { "cells": { "fill": { "color": "#EBF0F8" }, "line": { "color": "white" } }, "header": { "fill": { "color": "#C8D4E3" }, "line": { "color": "white" } }, "type": "table" } ] }, "layout": { "annotationdefaults": { "arrowcolor": "#2a3f5f", "arrowhead": 0, "arrowwidth": 1 }, "autotypenumbers": "strict", "coloraxis": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "colorscale": { "diverging": [ [ 0, "#8e0152" ], [ 0.1, "#c51b7d" ], [ 0.2, "#de77ae" ], [ 0.3, "#f1b6da" ], [ 0.4, "#fde0ef" ], [ 0.5, "#f7f7f7" ], [ 0.6, "#e6f5d0" ], [ 0.7, "#b8e186" ], [ 0.8, "#7fbc41" ], [ 0.9, "#4d9221" ], [ 1, "#276419" ] ], "sequential": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "sequentialminus": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ] }, "colorway": [ "#636efa", "#EF553B", "#00cc96", "#ab63fa", "#FFA15A", "#19d3f3", "#FF6692", "#B6E880", "#FF97FF", "#FECB52" ], "font": { "color": "#2a3f5f" }, "geo": { "bgcolor": "white", "lakecolor": "white", "landcolor": "#E5ECF6", "showlakes": true, "showland": true, "subunitcolor": "white" }, "hoverlabel": { "align": "left" }, "hovermode": "closest", "mapbox": { "style": "light" }, "paper_bgcolor": "white", "plot_bgcolor": "#E5ECF6", "polar": { "angularaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "bgcolor": "#E5ECF6", "radialaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" } }, "scene": { "xaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" }, "yaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" }, "zaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" } }, "shapedefaults": { "line": { "color": "#2a3f5f" } }, "ternary": { "aaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "baxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "bgcolor": "#E5ECF6", "caxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" } }, "title": { "x": 0.05 }, "xaxis": { "automargin": true, "gridcolor": "white", "linecolor": "white", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "white", "zerolinewidth": 2 }, "yaxis": { "automargin": true, "gridcolor": "white", "linecolor": "white", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "white", "zerolinewidth": 2 } } }, "title": { "text": "speech_1" }, "xaxis": { "anchor": "y", "domain": [ 0, 1 ], "title": { "text": "SNRin (dB)" } }, "yaxis": { "anchor": "x", "domain": [ 0, 1 ], "title": { "text": "PESQ(x_est)/PESQ(x)" } } } } }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/vnd.plotly.v1+json": { "config": { "linkText": "Export to plot.ly", "plotlyServerURL": "https://plot.ly", "showLink": false }, "data": [ { "alignmentgroup": "True", "error_x": { "array": [ "0", "10", "20" ] }, "error_y": { "array": [ 0.0018839596874408726, 0.008693428381887136, 0.02044510100232866 ], "arrayminus": [ 0.0016587506785169792, 0.008172340386276067, 0.0201680287500422 ] }, "hovertemplate": "Method + Param=Hard_Thr
SNRin=%{x}
QRF=%{y}", "legendgroup": "Hard_Thr", "marker": { "color": "#636efa", "pattern": { "shape": "" } }, "name": "Hard_Thr", "offsetgroup": "Hard_Thr", "orientation": "v", "showlegend": true, "textposition": "auto", "type": "bar", "x": [ "0", "10", "20" ], "xaxis": "x", "y": [ 0.2502172459998159, 0.34842948077540364, 0.6134476987868775 ], "yaxis": "y" }, { "alignmentgroup": "True", "error_x": { "array": [ "0", "10", "20" ] }, "error_y": { "array": [ 0.021667406946462686, 0.024948623826498317, 0.008491159387184477 ], "arrayminus": [ 0.023254302208018607, 0.029846561200295496, 0.010137100075939487 ] }, "hovertemplate": "Method + Param=Soft_Thr
SNRin=%{x}
QRF=%{y}", "legendgroup": "Soft_Thr", "marker": { "color": "#EF553B", "pattern": { "shape": "" } }, "name": "Soft_Thr", "offsetgroup": "Soft_Thr", "orientation": "v", "showlegend": true, "textposition": "auto", "type": "bar", "x": [ "0", "10", "20" ], "xaxis": "x", "y": [ 0.3951497538678877, 0.637234702206247, 0.7799506110898771 ], "yaxis": "y" } ], "layout": { "barmode": "group", "legend": { "title": { "text": "Method + Param" }, "tracegroupgap": 0 }, "template": { "data": { "bar": [ { "error_x": { "color": "#2a3f5f" }, "error_y": { "color": "#2a3f5f" }, "marker": { "line": { "color": "#E5ECF6", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "bar" } ], "barpolar": [ { "marker": { "line": { "color": "#E5ECF6", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "barpolar" } ], "carpet": [ { "aaxis": { "endlinecolor": "#2a3f5f", "gridcolor": "white", "linecolor": "white", "minorgridcolor": "white", "startlinecolor": "#2a3f5f" }, "baxis": { "endlinecolor": "#2a3f5f", "gridcolor": "white", "linecolor": "white", "minorgridcolor": "white", "startlinecolor": "#2a3f5f" }, "type": "carpet" } ], "choropleth": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "choropleth" } ], "contour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "contour" } ], "contourcarpet": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "contourcarpet" } ], "heatmap": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "heatmap" } ], "heatmapgl": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "heatmapgl" } ], "histogram": [ { "marker": { "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "histogram" } ], "histogram2d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "histogram2d" } ], "histogram2dcontour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "histogram2dcontour" } ], "mesh3d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "mesh3d" } ], "parcoords": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "parcoords" } ], "pie": [ { "automargin": true, "type": "pie" } ], "scatter": [ { "fillpattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 }, "type": "scatter" } ], "scatter3d": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatter3d" } ], "scattercarpet": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattercarpet" } ], "scattergeo": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergeo" } ], "scattergl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergl" } ], "scattermapbox": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattermapbox" } ], "scatterpolar": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolar" } ], "scatterpolargl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolargl" } ], "scatterternary": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterternary" } ], "surface": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "surface" } ], "table": [ { "cells": { "fill": { "color": "#EBF0F8" }, "line": { "color": "white" } }, "header": { "fill": { "color": "#C8D4E3" }, "line": { "color": "white" } }, "type": "table" } ] }, "layout": { "annotationdefaults": { "arrowcolor": "#2a3f5f", "arrowhead": 0, "arrowwidth": 1 }, "autotypenumbers": "strict", "coloraxis": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "colorscale": { "diverging": [ [ 0, "#8e0152" ], [ 0.1, "#c51b7d" ], [ 0.2, "#de77ae" ], [ 0.3, "#f1b6da" ], [ 0.4, "#fde0ef" ], [ 0.5, "#f7f7f7" ], [ 0.6, "#e6f5d0" ], [ 0.7, "#b8e186" ], [ 0.8, "#7fbc41" ], [ 0.9, "#4d9221" ], [ 1, "#276419" ] ], "sequential": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "sequentialminus": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ] }, "colorway": [ "#636efa", "#EF553B", "#00cc96", "#ab63fa", "#FFA15A", "#19d3f3", "#FF6692", "#B6E880", "#FF97FF", "#FECB52" ], "font": { "color": "#2a3f5f" }, "geo": { "bgcolor": "white", "lakecolor": "white", "landcolor": "#E5ECF6", "showlakes": true, "showland": true, "subunitcolor": "white" }, "hoverlabel": { "align": "left" }, "hovermode": "closest", "mapbox": { "style": "light" }, "paper_bgcolor": "white", "plot_bgcolor": "#E5ECF6", "polar": { "angularaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "bgcolor": "#E5ECF6", "radialaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" } }, "scene": { "xaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" }, "yaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" }, "zaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" } }, "shapedefaults": { "line": { "color": "#2a3f5f" } }, "ternary": { "aaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "baxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "bgcolor": "#E5ECF6", "caxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" } }, "title": { "x": 0.05 }, "xaxis": { "automargin": true, "gridcolor": "white", "linecolor": "white", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "white", "zerolinewidth": 2 }, "yaxis": { "automargin": true, "gridcolor": "white", "linecolor": "white", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "white", "zerolinewidth": 2 } } }, "title": { "text": "speech_2" }, "xaxis": { "anchor": "y", "domain": [ 0, 1 ], "title": { "text": "SNRin (dB)" } }, "yaxis": { "anchor": "x", "domain": [ 0, 1 ], "title": { "text": "PESQ(x_est)/PESQ(x)" } } } } }, "metadata": {}, "output_type": "display_data" } ], "source": [ "# Summary interactive plots with Plotly\n", "from plotly.offline import iplot\n", "interpreter = ResultsInterpreter(benchmark)\n", "figs = interpreter.get_summary_plotlys(bars=True)\n", "for fig in figs:\n", " fig.update_layout(yaxis_title=\"PESQ(x_est)/PESQ(x)\")\n", " iplot(fig)\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Checking elapsed time for each method" ] }, { "cell_type": "code", "execution_count": 12, "metadata": {}, "outputs": [ { "data": { "application/vnd.microsoft.datawrangler.viewer.v0+json": { "columns": [ { "name": "index", "rawType": "object", "type": "string" }, { "name": "Average time (s)", "rawType": "float64", "type": "float" }, { "name": "Std", "rawType": "float64", "type": "float" } ], "conversionMethod": "pd.DataFrame", "ref": "54ae39a1-3fa5-4054-85fb-5dafbd878c30", "rows": [ [ "speech_1-Hard_Thr-((), {})", "0.0007336616516113281", "6.3608879438393e-05" ], [ "speech_1-Soft_Thr-((), {})", "0.0008643388748168946", "8.969673565495699e-05" ], [ "speech_2-Hard_Thr-((), {})", "0.0007465600967407227", "7.457137465162545e-05" ], [ "speech_2-Soft_Thr-((), {})", "0.0009099483489990234", "0.00010348795647061483" ] ], "shape": { "columns": 2, "rows": 4 } }, "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
Average time (s)Std
speech_1-Hard_Thr-((), {})0.0007340.000064
speech_1-Soft_Thr-((), {})0.0008640.000090
speech_2-Hard_Thr-((), {})0.0007470.000075
speech_2-Soft_Thr-((), {})0.0009100.000103
\n", "
" ], "text/plain": [ " Average time (s) Std\n", "speech_1-Hard_Thr-((), {}) 0.000734 0.000064\n", "speech_1-Soft_Thr-((), {}) 0.000864 0.000090\n", "speech_2-Hard_Thr-((), {}) 0.000747 0.000075\n", "speech_2-Soft_Thr-((), {}) 0.000910 0.000103" ] }, "execution_count": 12, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df = interpreter.elapsed_time_summary()\n", "df" ] } ], "metadata": { "kernelspec": { "display_name": ".venv", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.10.12" }, "orig_nbformat": 4 }, "nbformat": 4, "nbformat_minor": 2 }