Cangwu badness: Difference between revisions
m Protected "Cangwu badness" ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite)) |
fix headings and some math formatting |
||
| (4 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
''Cangwu badness'' is a polynomial function [[Badness|badness]] measure; the name stems from Cangwu Green Park, Lianyungang, China, where [[Graham_Breed|Graham Breed]] thought it up. | ''Cangwu badness'' is a polynomial function [[Badness|badness]] measure; the name stems from Cangwu Green Park, Lianyungang, China, where [[Graham_Breed|Graham Breed]] thought it up. | ||
= Definitions = | == Definitions == | ||
In the following definitions, suppose that <math>C(T)</math> is the [[Tenney-Euclidean_temperament_measures#TE_Complexity|TE Complexity]], and <math>E_R(T)</math> is the [[Tenney-Euclidean_temperament_measures#TE_simple_badness|"relativized error"]] of temperament <math>T</math>. The "relativized error" for EDOs gives the error as a proportion of the step size, and yields a similar result for higher-rank temperaments; we may also call it the "TE Simple Badness." The Cangwu badness, then, can be most simply thought of as a weighted RMS of the two. The main feature of Cangwu badness is that there is a free '''weighting''' parameter determining how much we are weighting the error vs complexity into the calculation. | In the following definitions, suppose that <math>C(T)</math> is the [[Tenney-Euclidean_temperament_measures#TE_Complexity|TE Complexity]], and <math>E_R(T)</math> is the [[Tenney-Euclidean_temperament_measures#TE_simple_badness|"relativized error"]] of temperament <math>T</math>. The "relativized error" for EDOs gives the error as a proportion of the step size, and yields a similar result for higher-rank temperaments; we may also call it the "TE Simple Badness." The Cangwu badness, then, can be most simply thought of as a weighted RMS of the two. The main feature of Cangwu badness is that there is a free '''weighting''' parameter determining how much we are weighting the error vs complexity into the calculation. | ||
| Line 10: | Line 10: | ||
== Simplified Version of Graham's Definition == | === Simplified Version of Graham's Definition === | ||
Let <math>\epsilon</math> be a free parameter in <math>[0,1]</math>. The Cangwu badness is then simply defined via the weighted RMS | Let <math>\epsilon</math> be a free parameter in <math>[0,1]</math>. The Cangwu badness is then simply defined via the weighted RMS | ||
:<math> | |||
\sqrt{(1-\epsilon^2)E_R(T)^2 + \epsilon^2 C(T)^2} | \sqrt{(1-\epsilon^2)E_R(T)^2 + \epsilon^2 C(T)^2} | ||
</math> | |||
where the squaring is just due to convention and/or for numerical stability reasons. | where the squaring is just due to convention and/or for numerical stability reasons. | ||
| Line 23: | Line 23: | ||
== Simplified Version of Graham's Definition With "Intended Cents of Error" Parameter == | === Simplified Version of Graham's Definition With "Intended Cents of Error" Parameter === | ||
Graham tends to use a change of variables so that the free parameter can be viewed as a number of cents representing the "intended target error" in temperament searches. To that extent, we define the change of variables | Graham tends to use a change of variables so that the free parameter can be viewed as a number of cents representing the "intended target error" in temperament searches. To that extent, we define the change of variables | ||
:<math> | |||
\begin{aligned} | |||
\epsilon^2 = \frac{E_k^2}{1+E_k^2} \\ | \epsilon^2 = \frac{E_k^2}{1+E_k^2} \\ | ||
E_k^2 = \frac{\epsilon^2}{1-\epsilon^2} | E_k^2 = \frac{\epsilon^2}{1-\epsilon^2} | ||
\end{aligned} | |||
</math> | |||
So that <math>E_k</math> can now be thought of as a real number in <math>[0,\infty)</math>. This leads to the formula | So that <math>E_k</math> can now be thought of as a real number in <math>[0,\infty)</math>. This leads to the formula | ||
:<math> | |||
\sqrt{\frac{E_R(T)^2 + E_k^2 C(T)^2}{1+E_k^2}} | \sqrt{\frac{E_R(T)^2 + E_k^2 C(T)^2}{1+E_k^2}} | ||
</math> | |||
This formula is also equivalent to the one used in Graham's python library in terms of the <math>E_k</math> parameter, and is again equivalent to the version in his articles except for the aforementioned scalar multiplication. | This formula is also equivalent to the one used in Graham's python library in terms of the <math>E_k</math> parameter, and is again equivalent to the version in his articles except for the aforementioned scalar multiplication. | ||
== Graham's Original Definition == | === Graham's Original Definition === | ||
Graham's original definition, in terms of <math>E_k</math>, can be written as | Graham's original definition, in terms of <math>E_k</math>, can be written as | ||
:<math> | |||
\sqrt{\frac{E_R(T)^2 + E_k^2 C(T)^2}{1+E_k^2}} \cdot \left(\sqrt{1+E_k^2}\right)^{\text{rank( | \sqrt{\frac{E_R(T)^2 + E_k^2 C(T)^2}{1+E_k^2}} \cdot \left(\sqrt{1+E_k^2}\right)^{\text{rank}(T)} | ||
</math> | |||
This can be shown to be identical to the metric given in Graham's three articles linked above, although he originally defined it in terms of a large matrix formula. It is also equivalent to the metrics previously given, except for the presence of the added term | This can be shown to be identical to the metric given in Graham's three articles linked above, although he originally defined it in terms of a large matrix formula. It is also equivalent to the metrics previously given, except for the presence of the added term | ||
:<math> | |||
\left(\sqrt{1+E_k^2}\right)^{\text{rank( | \left(\sqrt{1+E_k^2}\right)^{\text{rank}(T)} | ||
</math> | |||
which, for any choice of <math>E_k</math> or <math>\text{rank}( | which, for any choice of <math>E_k</math> or <math>\text{rank}(T)</math>, multiplies all temperaments only by a scalar. | ||
== Gene Smith's Matrix Determinant Definition == | === Gene Smith's Matrix Determinant Definition === | ||
[[Gene Ward Smith]] wrote the below presentation of Cangwu badness in terms of the characteristic polynomial of a matrix. The definition is again equivalent to the above, except it is equivalent to the *square* of the above Cangwu badness, and again involving equivalence only up to a scalar multiplication. | [[Gene Ward Smith]] wrote the below presentation of Cangwu badness in terms of the characteristic polynomial of a matrix. The definition is again equivalent to the above, except it is equivalent to the *square* of the above Cangwu badness, and again involving equivalence only up to a scalar multiplication. | ||
| Line 66: | Line 68: | ||
Gene's definition of the Cangwu badness is in terms | Gene's definition of the Cangwu badness is in terms | ||
:<math> | |||
C(x) = \det\left(\left[(1+x)\frac{v_i \cdot v_j}{n} - a_ia_j\right]\right) | C(x) = \det\left(\left[(1+x)\frac{v_i \cdot v_j}{n} - a_ia_j\right]\right) | ||
</math> | |||
where the vᵢ are r independent weighted vals of dimension n defining a rank r regular temperament, and the aᵢ are the average of the values of vᵢ; that is, the sum of the values of vᵢ divided by n. | where the vᵢ are r independent weighted vals of dimension n defining a rank r regular temperament, and the aᵢ are the average of the values of vᵢ; that is, the sum of the values of vᵢ divided by n. | ||
| Line 74: | Line 76: | ||
From this definition, it follows that C(0) is proportional to the square of [[Tenney-Euclidean_temperament_measures#TE simple badness|simple badness]], aka relative error. The leading coefficient of the polynomial defining C(x) is proportional to the square of [[Tenney-Euclidean_temperament_measures#TE Complexity|TE complexity]]. Hence as x grows larger, C(x) increasingly weights smaller complexity temperaments as better, and in the limit becomes a complexity measure, whereas at 0 C(0) is a badness measure which strongly favors more accurate temperaments, being in fact a measure of relative error. | From this definition, it follows that C(0) is proportional to the square of [[Tenney-Euclidean_temperament_measures#TE simple badness|simple badness]], aka relative error. The leading coefficient of the polynomial defining C(x) is proportional to the square of [[Tenney-Euclidean_temperament_measures#TE Complexity|TE complexity]]. Hence as x grows larger, C(x) increasingly weights smaller complexity temperaments as better, and in the limit becomes a complexity measure, whereas at 0 C(0) is a badness measure which strongly favors more accurate temperaments, being in fact a measure of relative error. | ||
== Cangwu Dominance == | |||
If Ca(x) is the Cangwu badness for rank r temperament 'a', and Cb(x) for 'b', we can say a ''dominates'' b if Cb(x) - Ca(x) is a positive function for x ≥ 0, which says that the badness of 'a' is always less than the badness of 'b' for every choice of the parameter x. If a temperament is not dominated by any temperament of the same rank (and on the same subgroup, if we are considering subgroups) we may say it is ''indomitable''. An alternative procedure is to divide the cangwu badness polynomial by the coefficient of the highest degree term, getting a monic polynomial with constant term proportional to the the square of TE absolute error. When one temperament dominates another using this polynomial, it is lower in both error and complexity. | If Ca(x) is the Cangwu badness for rank r temperament 'a', and Cb(x) for 'b', we can say a ''dominates'' b if Cb(x) - Ca(x) is a positive function for x ≥ 0, which says that the badness of 'a' is always less than the badness of 'b' for every choice of the parameter x. If a temperament is not dominated by any temperament of the same rank (and on the same subgroup, if we are considering subgroups) we may say it is ''indomitable''. An alternative procedure is to divide the cangwu badness polynomial by the coefficient of the highest degree term, getting a monic polynomial with constant term proportional to the the square of TE absolute error. When one temperament dominates another using this polynomial, it is lower in both error and complexity. | ||