User:Sintel/Generator optimization: Difference between revisions
No edit summary |
No edit summary |
||
| Line 30: | Line 30: | ||
Using <math>\left\| \cdot \right\|</math> to denote the usual Euclidean norm, this becomes a standard ordinary least squares problem: | Using <math>\left\| \cdot \right\|</math> to denote the usual Euclidean norm, this becomes a standard ordinary least squares problem: | ||
$$ | $$ | ||
\underset{g}{\text{minimize}} | \underset{g}{\text{minimize}} \ \| gMV - jV \|^2 | ||
$$ | $$ | ||
Note that since we are working with row vectors, the norm is defined such that <math>\left\| x \right\|^2 = xx^{\mathsf T}</math>. | Note that since we are working with row vectors, the norm is defined such that <math>\left\| x \right\|^2 = xx^{\mathsf T}</math>. | ||
| Line 60: | Line 60: | ||
This results in a weighted least squares problem: | This results in a weighted least squares problem: | ||
$$ | $$ | ||
\underset{g}{\text{minimize}} | \underset{g}{\text{minimize}} \ \| gMV - jV \|_{W^2}^2 | ||
$$ | $$ | ||
We can write this in the same as an ordinary least squares problem by setting: | We can write this in the same as an ordinary least squares problem by setting: | ||
| Line 75: | Line 75: | ||
We then solve | We then solve | ||
$$ | $$ | ||
\underset{g}{\text{minimize}} | \underset{g}{\text{minimize}} \ \| gM'V - j'V \|^2 | ||
$$ | $$ | ||
as above. | as above. | ||
| Line 81: | Line 81: | ||
== Constraints == | == Constraints == | ||
If we want some intervals to be exactly just, while optimizing all the | If we want some intervals to be exactly just, while optimizing all the others, we can introduce linear constraints. A good example is CTE tuning, where octaves are always just. This gives the following optimization problem: | ||
$$ | $$ | ||
\begin{align} | \begin{align} | ||
\underset{g}{\text{minimize}} & \ | \underset{g}{\text{minimize}} & \ \| gMW - jW \|^2 \\ | ||
\text{subject to} & \quad gMV - jV = 0 \\ | \text{subject to} & \quad gMV - jV = 0 \\ | ||
\end{align} | \end{align} | ||