A softward for generating Start-End and Start-Normalized Length Diagrams from Aligned Hierarchies for Music-Based Data.
Melissa R. McGuirl, Katherine M. Kinnaird, Claire Savard, Erin Bugbee.
For questions/comments please contact Melissa R. McGuirl at melissa_mcguirl@brown.edu.
This software addresses the cover-song task for music-based data.
This software takes as input a collection of .mat files containing Aligned Hierarchies data stored in variables called 'full_key' and 'full_matrix_no,' where 'full_matrix_no' is a matrix indicating where the repeated structures start and 'full_key' is a vector containing the length of the repeated structures in each row.
Precision and Recall values for mutual k-nearest neighbor matching on SE/SNL diagrams for the cover song task.
- Wasserstein Inner Norm: Value in [1.0, Infinity]
- Wasserstein Outer Norm: Value in [1.0, Infinity] (note, when the outer norm =infinit you are using the Bottleneck metric. In this case the inner norm is automatically set to l-infinity)
- Normalization (for run_SNLD.py): 'none' for no mormalization, 'std' for ordinary normalization, or 'cheb' for chebyshev normalization.
- Alpha: Scaling parameter alpha, alpha = 1 indicates no scaling.
python run_SE.py [-h HELP_MENU] -I INPUT_DIRECTORY -w INNER_NORM -W OUTER_NORM python run_SNLD.py [-h HELP_MENU] -I INPUT_DIRECTORY -N NORMALIZATION -A ALPHA -w INNER_NORM -W OUTER_NORM
Hera (available here: https://bitbucket.org/grey_narn/hera.git), Python 2.7, numpy, scipy, sklearn
IMPORTANT: If you are using hera to compute distances between SL or SnL diagrams, you must first modify the hera source code to move the 'diagonal' to the y-axis. This should be done in basic_defs.cpp for both the Wasserstein and Bottleneck codes.
- python run_E.py -I ../data/Thresh01_ShingleNumber6/ -w 2 -W 2 (SE diagrams with 2-2 Wasserstein metric)
- python run_SNLD.py -I ../data/Thresh01_ShingleNumber6/ -N none -A 0 -w 2 -W 2 (SL diagrams with 2-2 Wasserstein metric)
- python run_SNLD.py -I ../data/Thresh01_ShingleNumber6/ -N std -A 1 -w 2 -W 2 (SNL diagrams with standard normalization (M = maximum start time), alpha=1, and the 2-2 Wasserstein metric)
- python run_SNLD.py -I ../data/Thresh01_ShingleNumber6/ -N cheb -A 10 -w inf -W inf (SNL diagrams with chebyshev normalization, alpha=10, and the infinity-Bottleneck metric)
- Extract start-end diagrams or start-normalized length diagrams from Aligned Hierarchies
- Normalize start times using chebyshev/standard norm (if specified)
- Compute Wasserstein or Bottleneck distances between all diagrams in the dataset
- Use mutual k-nearest neighbor to pair songs
- Generate truth (exanded version of each song pairs with non-expanded version)
- Compare to true pairing with SE/SNL mutual-KNN pairing
- Compute precision and recall
- python TREE.py -h
- Make sofware flexible for cases where truth is not known
- Save mutual knn results to text file
This accompanying paper for this sofware is:
For more information on Aligned Hierarchies see:
- K. M. Kinnaird. Aligned Hierarchies: A Multi-Scale Structure-based Representation For Music-Based Data Streams. Proceedings of the 17th ISMIR Conference, New York City, 2016.