mcsm-benchs: A Toolbox for Benchmarking Multi-Component Signal Analysis Methods
A public, open-source, Python-based toolbox for benchmarking multi-component signal analysis methods, implemented either in Python or MATLAB/Octave.
This toolbox provides a common framework that allows researcher-independent comparisons between methods and favors reproducible research.
Create your own collaborative benchmarks using mcsm-benchs and this GitHub template.
Collaborative benchmarks allow other researchers to add new methods to your benchmark via a pull-request.
This is as easy as creating a new .py file with a Python class that wraps a call to your method (it doesn't matter if it is coded in Python, MATLAB or Octave... we welcome all!).
Template files are available for this too. Let's make collaborative science easy :).
The GitHub workflows provided in the template can automatically publish a summary report like this of the benchmarks saved in your repository, as well as make interactive online plots and give access to .csv files with the data.
[!TIP] Questions or difficulties using
mcsm-benchs?Please consider leaving an Issue so that we can help you and improve our software ✅.
[!TIP] 🚧 Do you want to contribute to
mcsm-benchs?Please check our contribution guidelines ✅.
Installation using pip
pip install mcsm-benchs
For installation in development mode using poetry check instructions in the documentation.
Documentation
Quick-start
Creating a new benchmark
The following simple example shows how to create a new benchmark for comparing your methods.
We set task=denoising, meaning that all methods will be compared in terms of reconstruction of the original signal from noise.
Check out examples with other tasks and performance functions in the documentation of mcsm-benchs.
from mcsm_benchs.Benchmark import Benchmark
from mcsm_benchs.SignalBank import SignalBank
# 1. Import (or define) the methods to be compared.
from my_methods import method_1, method_2
# 2. Create a dictionary of the methods to test.
my_methods = { 'Method 1': method_1, 'Method 2': method_2, }
# 3. Create a dictionary of signals:
N = 1024 # Length of the signals
sbank = SignalBank(N,)
s1 = sbank.signal_exp_chirp()
s2 = sbank.signal_linear_chirp()
my_signals = {'Signal_1':s1, 'Signal_2':s2, }
# 4. Set the benchmark parameters:
benchmark = Benchmark(task='denoising',
N=N,
repetitions = 100,
SNRin=[0,10,20], # SNR in dB.
methods=my_methods,
signals=my_signals,
verbosity=0
)
# 5. Launch the benchmark and save to file
benchmark.run() # Run the benchmark.
benchmark.save_to_file('saved_benchmark') # Give a filename and save to file
Processing and publishing benchmark results
from mcsm_benchs.Benchmark import Benchmark
from mcsm_benchs.ResultsInterpreter import ResultsInterpreter
# 1. Load a benchmark from a file.
benchmark = Benchmark.load('path/to/file/saved_benchmark')
# 2. Create the interpreter
interpreter = ResultsInterpreter(benchmark)
# 3. Get .csv files
interpreter.get_csv_files(path='path/to/csv/files')
# 4. Generate report and interactive figures
interpreter.save_report(path='path/to/report', bars=False)
#5 Or generate interactive plots with plotly
from plotly.offline import iplot
figs = interpreter.get_summary_plotlys(bars=True)
for fig in figs:
iplot(fig)
If you use the GitHub template for collaborative benchmarks, your results are automatically published if you enable GitHub sites in the repository configuration.
Additionally, other researchers will be able to interact with your results, download .csv files with all the benchmark data and even add their own methods to your benchmark via a pull-request.
Related work
More
📌 We use oct2py to run Octave-based methods in Python.
📌 We use matlabengine to run MATLAB-based methods in Python.
📌 We use plotly to create online, interactive plots.
Metadata
Release files for mcsm-benchs 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mcsm_benchs-0.1.3.tar.gz | 47.5 kB | Without provenance | Details for mcsm_benchs-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mcsm_benchs-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for mcsm_benchs-0.1.3-py3-none-any.whl |
Total release size: 97.5 kB
Release files / mcsm_benchs-0.1.3.tar.gz
| Download URL | mcsm_benchs-0.1.3.tar.gz |
|---|---|
| Size | 47.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2995482950a9279c5e096ad2865155fc5a21eaceb67e9bc396af07fdee462046
|
|
BLAKE2b-256 checksum How to use checksums |
3644fee712831efc7601c5e5cd733972a20648608bca9fe5dd92d0ec01f2626b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.1 CPython/3.12.3 Linux/6.8.0-55-generic
|
Release files / mcsm_benchs-0.1.3-py3-none-any.whl
| Download URL | mcsm_benchs-0.1.3-py3-none-any.whl |
|---|---|
| Size | 50.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c3428391592d01f93000964ce7b94fd4787e8bea3bf46d2aea80f501316d6b81
|
|
BLAKE2b-256 checksum How to use checksums |
cbf4ea267adca98c9322b408126747d8ef18df3530db8f148c0ec63371ac1128
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.1 CPython/3.12.3 Linux/6.8.0-55-generic
|
Security for mcsm-benchs 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.