music-puzzle-games icon indicating copy to clipboard operation
music-puzzle-games copied to clipboard

Brute Force Method File Number Restriction

Open mkirshner opened this issue 6 years ago • 1 comments

Hi,

Big fan. I attempted to run the code with 48 'highlights' successfully acquired from your pop-music-highlighter code output. Left it running over night but my computer became unresponsive.

Can ;you shed light on why 11 should be the maximum number? Is there a restriction to the length of these tracks? A work-around could be to hierarchically check best permutations based on some classification criteria, and repeat the process multiple times sequentially.

mkirshner avatar Jan 25 '19 17:01 mkirshner

Hi,

Because we use a very simple brute-force method to sequence. The steps are:

  1. generate all the possible permutations first! #41 ps = [p for p in multiset_permutations(np.arange(n))]
  2. then, calculate the score for every permutation.

So, actually, the bottleneck is #41 which will generate n! permutation (n is the number of target segments) That's why we set the maximum number is 11. Because 12! = 479001600 (this amount seems "unresponsive" in our experiments.)

A more efficiency method would be helpful for large target segments like a hierarchial method you mentioned. (PR welcome!)

remyhuang avatar Jan 26 '19 01:01 remyhuang