N2D3P9: Difference between revisions

Dave Keenan (talk | contribs)
m Changed: "A brute-force technique was also utilized whereby" to "The approach that was finally successful was a brute-force approach implemented by Douglas Blumeyer, whereby".
Dave Keenan (talk | contribs)
m Changed: "In the end, one of the functions generated from the brute-force checker" to "In the end, one of the functions on the short-list generated from the brute-force checker".
Line 87: Line 87:
The overall strategy, then, was to minimize this weighted rank correlation, while also minimizing the complexity of the function, to avoid overfitting. An earlier 5-rough-ratio notational popularity ranking function that had been used by the creators of Sagittal was <math>\text{sopfr}</math> ([https://mathworld.wolfram.com/SumofPrimeFactors.html sum of prime factors with repetition]), and as simple as this function is, it does a remarkably good job of estimating the rank of pitch ratios. For comparison, the weighted sum of squares that <math>\text{sopfr}</math> gives for the Scala stats is about 0.026, while the weighted sum of squares <math>\text{N2D3P9}</math> gives is about 0.010. Functions giving sums of squares as low as 0.008 were found, however, these functions were so complex that they probably were fitting to noise in the Scala stats instead of to the true nature of musical pitch. An informal “chunk” metric was devised to compare function complexity in terms of fit to the data, with considered functions ranging from one chunk (<math>\text{sopfr}</math>) to eight chunks; the winning function <math>\text{N2D3P9}</math> has five chunks.
The overall strategy, then, was to minimize this weighted rank correlation, while also minimizing the complexity of the function, to avoid overfitting. An earlier 5-rough-ratio notational popularity ranking function that had been used by the creators of Sagittal was <math>\text{sopfr}</math> ([https://mathworld.wolfram.com/SumofPrimeFactors.html sum of prime factors with repetition]), and as simple as this function is, it does a remarkably good job of estimating the rank of pitch ratios. For comparison, the weighted sum of squares that <math>\text{sopfr}</math> gives for the Scala stats is about 0.026, while the weighted sum of squares <math>\text{N2D3P9}</math> gives is about 0.010. Functions giving sums of squares as low as 0.008 were found, however, these functions were so complex that they probably were fitting to noise in the Scala stats instead of to the true nature of musical pitch. An informal “chunk” metric was devised to compare function complexity in terms of fit to the data, with considered functions ranging from one chunk (<math>\text{sopfr}</math>) to eight chunks; the winning function <math>\text{N2D3P9}</math> has five chunks.


Several techniques were used to find and decide on <math>\text{N2D3P9}</math> as the best 5-rough ratio notational popularity rank estimation function. Initial observations about shortcomings of <math>\text{sopfr}</math>, such as its failure to differentiate balanced ratios from their imbalanced equivalents — such as <math>\frac{11}{5}</math> versus <math>\frac{55}{1}</math> — or those with different prime limits such as <math>\frac{13}{5}</math> and <math>\frac{11}{7}</math>, despite those pairs of ratios exhibiting remarkably different actual ranks in the Scala stats, formed the basis of the investigation. Psychoacoustic plausibility of functions was used as a top-down guide for experimentation. [https://en.wikipedia.org/wiki/Mathematical_optimization Optimization] tools such as [https://www.microsoft.com/en-us/microsoft-365/blog/2009/09/21/new-and-improved-solver/ Excel's Evolutionary Solver] were used to navigate toward ideal values for each parameter. The approach that was finally successful was a brute-force approach implemented by Douglas Blumeyer, whereby nearly 2 billion functions combined out of constituent "submetrics" were checked automatically. In the end, one of the functions generated from the brute-force checker was recognized as being re-writable in a much simpler form with parameter values rounded to whole numbers without doing much damage to its sum-of-squares, and thus <math>\text{N2D3P9}</math> was born.
Several techniques were used to find and decide on <math>\text{N2D3P9}</math> as the best 5-rough ratio notational popularity rank estimation function. Initial observations about shortcomings of <math>\text{sopfr}</math>, such as its failure to differentiate balanced ratios from their imbalanced equivalents — such as <math>\frac{11}{5}</math> versus <math>\frac{55}{1}</math> — or those with different prime limits such as <math>\frac{13}{5}</math> and <math>\frac{11}{7}</math>, despite those pairs of ratios exhibiting remarkably different actual ranks in the Scala stats, formed the basis of the investigation. Psychoacoustic plausibility of functions was used as a top-down guide for experimentation. [https://en.wikipedia.org/wiki/Mathematical_optimization Optimization] tools such as [https://www.microsoft.com/en-us/microsoft-365/blog/2009/09/21/new-and-improved-solver/ Excel's Evolutionary Solver] were used to navigate toward ideal values for each parameter. The approach that was finally successful was a brute-force approach implemented by Douglas Blumeyer, whereby nearly 2 billion functions combined out of constituent "submetrics" were checked automatically. In the end, one of the functions on the short-list generated from the brute-force checker was recognized as being re-writable in a much simpler form with parameter values rounded to whole numbers without doing much damage to its sum-of-squares, and thus <math>\text{N2D3P9}</math> was born.


After deciding upon <math>\text{N2D3P9}</math>, the Sagittal forum members checked the ratios for the existing Sagittal symbols against it, to see how well they'd been served by the Scala archive stats and the earlier <math>\text{sopfr}</math> metric. Each symbol in Sagittal's JI notations has a default value, or primary comma, which allows it to exactly notate ratios in a 5-rough ratio equivalence class, and based on <math>\text{N2D3P9}</math>, it was found that only a couple of these commas should be changed (these were among the rarest-used symbols in Sagittal). This was as expected; <math>\text{N2D3P9}</math> was developed primarily in order to add new symbols to Sagittal, to enable it to exactly notate even rarer JI pitches than it already does.
After deciding upon <math>\text{N2D3P9}</math>, the Sagittal forum members checked the ratios for the existing Sagittal symbols against it, to see how well they'd been served by the Scala archive stats and the earlier <math>\text{sopfr}</math> metric. Each symbol in Sagittal's JI notations has a default value, or primary comma, which allows it to exactly notate ratios in a 5-rough ratio equivalence class, and based on <math>\text{N2D3P9}</math>, it was found that only a couple of these commas should be changed (these were among the rarest-used symbols in Sagittal). This was as expected; <math>\text{N2D3P9}</math> was developed primarily in order to add new symbols to Sagittal, to enable it to exactly notate even rarer JI pitches than it already does.