Constrained tuning: Difference between revisions

Line 200: Line 200:
Notice we introduced the vector of lagrange multipliers ''Λ'', with length equal to the number of constraints. The lagrange multipliers have no concrete meaning for the resulting tuning, so they can be discarded.
Notice we introduced the vector of lagrange multipliers ''Λ'', with length equal to the number of constraints. The lagrange multipliers have no concrete meaning for the resulting tuning, so they can be discarded.


=== Simple fast closed-form algorithm ===
==== Simple fast closed-form algorithm ====
Another way to compute the CTE and CWE tunings, and the CTWE tuning in general, is to use the pseudoinverse.
Another way to compute the CTE and CWE tunings, and the CTWE tuning in general, is to use the pseudoinverse.


Line 285: Line 285:
}}
}}


=== Interpolating TE/CTE ===
==== Interpolating TE/CTE ====
We can also interpolate between the TE and CTE tunings, if we want. To do this, we modify the TE tuning so that the weighting of the 2's coefficient is very large. As the weighting goes to infinity, we get the CTE tuning. Thus, we can set it to some sufficiently large number, so that we get whatever numerical precision we want, and compute the result in closed-form using the pseudoinverse. Without comments, docstrings, etc, the calculation is only about five lines of python code:
We can also interpolate between the TE and CTE tunings, if we want. To do this, we modify the TE tuning so that the weighting of the 2's coefficient is very large. As the weighting goes to infinity, we get the CTE tuning. Thus, we can set it to some sufficiently large number, so that we get whatever numerical precision we want, and compute the result in closed-form using the pseudoinverse. Without comments, docstrings, etc, the calculation is only about five lines of python code: