Optimization: Difference between revisions

Norm: finish removing "minkowskian"
Improve notation: getting rid of A and B, only V and M now. Misc wording improvements
Line 5: Line 5:
== Taxonomy ==
== Taxonomy ==
Roughly speaking, there are two types of tunings with diverging philosophies: ''prime-based tunings'' and ''target tunings''.  
Roughly speaking, there are two types of tunings with diverging philosophies: ''prime-based tunings'' and ''target tunings''.  
* A prime-based tuning is optimized for the [[formal prime]]s, but they are representative for the set of all intervals. There are two perspectives. First, in the [[Vals and tuning space|tuning space]], it minimizes the errors of formal primes. Second, in the [[Monzos and interval space|interval space]], it rates all intervals through a norm, which serves as a complexity measure, and it minimizes the maximum [[damage]] (i.e. error divided by complexity) for all intervals.  
* A prime-based tuning is optimized for the [[formal prime]]s, but they are representative for the set of all intervals. There are two equivalent perspectives. First, in the [[Vals and tuning space|tuning space]], it minimizes the errors of formal primes. Second, in the [[Monzos and interval space|interval space]], it rates all intervals through a norm, which serves as a complexity measure, and it minimizes the maximum [[damage]] (i.e. error divided by complexity) for all intervals.  
* A target tuning is optimized for a particular set of intervals and considers the rest irrelevant. However, the interval does not get infinite complexity even if it is disregarded due to the normed nature of the interval space, so these tunings also correspond to all-interval damage minimizations of some sorts.  
* A target tuning is optimized for a particular set of intervals and considers the rest irrelevant. However, the interval does not get infinite complexity even if it is disregarded due to the normed nature of the interval space, so these tunings also correspond to all-interval damage minimizations of some sorts.  


Line 16: Line 16:


=== Weight ===
=== Weight ===
The weight determines the importance of each formal prime. For instance, the Tenney weighter
The weight determines the importance of each formal prime. For instance, the Tenney weight is represented by the transformation matrix


<math>\displaystyle W = \operatorname {diag} (1/\log_2 (Q)) </math>
<math>\displaystyle W = \operatorname {diag} (1/\log_2 (Q)) </math>


indicates that the prime harmonic ''q'' in Q = {{val| 2 3 5 … }} has the importance of 1/log<sub>2</sub>(''q''). Since the tuning space and the interval space are [[Wikipedia:Dual (mathematics)|dual]] to each other, such a rating of importance in the tuning space has the dual effect in the interval space: the prime harmonic ''q'' has the complexity log<sub>2</sub>(''q''). The more complex it is, the more error will be allowed for it.  
which indicates that the prime harmonic ''q'' in Q = {{val| 2 3 5 … }} has the importance of 1/log<sub>2</sub>(''q''). Since the tuning space and the interval space are [[Wikipedia:Dual (mathematics)|dual]] to each other, such a rating of importance in the tuning space has the dual effect in the interval space: the prime harmonic ''q'' has the complexity log<sub>2</sub>(''q''). The more complex an interval is, the more error will be allowed for it.  


=== Skew ===
=== Skew ===
Line 34: Line 34:
The Euclidean norm aka ''L''<sup>2</sup> norm resembles real-world distances.  
The Euclidean norm aka ''L''<sup>2</sup> norm resembles real-world distances.  


The Manhattan norm or taxicab norm aka ''L''<sup>1</sup> norm resembles movement of taxicabs in Manhattan – it can only traverse horizontally or vertically. A diagonal movement mounts to two steps.  
The Manhattan norm or taxicab norm aka ''L''<sup>1</sup> norm resembles movement of taxicabs in Manhattan – it can only traverse horizontally or vertically. A diagonal movement counts as two steps.  


The Chebyshevian norm aka ''L''<sup>infinity</sup> norm is the opposite of the Manhattan norm – it is the maximum number of steps in any direction, so a diagonal movement is the same as a horizontal or vertical one.  
The Chebyshevian norm aka ''L''<sup>infinity</sup> norm is the opposite of the Manhattan norm – it is the maximum number of steps in any direction, so a diagonal movement is the same as a horizontal or vertical one.  
Line 50: Line 50:


== General formulation ==
== General formulation ==
In general, the temperament optimization problem (except for the destretch) can be defined as follows. Given a temperament mapping ''A'' and the [[just intonation point]] (JIP) ''J''<sub>0</sub>, we specify a weight ''W'', a skew ''X'', and a ''p''-norm. An optional eigenmonzo list ''B''<sub>C</sub> can be added. The goal is to find the generator list ''G'' by
In general, the temperament optimization problem (except for the destretch) can be defined as follows. Given a temperament mapping V and the [[just intonation point]] (JIP) J, we specify a weight and a skew, represented by transformation matrices W and X, respectively, and a ''p''-norm. An optional eigenmonzo list M<sub>C</sub> can be added. The goal is to find the generator list G by


Minimize
Minimize


<math>\displaystyle \lVert GV - J \rVert_p </math>
<math>\displaystyle \lVert GV_{WX} - J_{WX} \rVert_p </math>


subject to
subject to


<math>\displaystyle (GA - J_0)B_{\rm C} = O </math>
<math>\displaystyle (GV - J)M_{\rm C} = O </math>


where ''V'' is the weight-skewed mapping and ''J'' the weight-skewed JIP, found by
where (·)<sub>WX</sub> denotes the weight-skew transformation, found by


<math>\displaystyle
<math>\displaystyle
\begin{align}
\begin{align}
V &= AWX \\
V_{WX} &= VWX \\
J &= J_0 WX
J_{WX} &= JWX
\end{align}
\end{align}
</math>
</math>