Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
optimization-parameter-scaling [2017/11/13 09:55] – awf | optimization-parameter-scaling [2021/09/03 13:34] (current) – awf | ||
---|---|---|---|
Line 36: | Line 36: | ||
So instead I far prefer to place some onus on you, the user of the routine. | So instead I far prefer to place some onus on you, the user of the routine. | ||
- | > *Scale x so its values | + | > **Scale x so its components |
This is actually pretty easy in practice. | This is actually pretty easy in practice. | ||
Line 53: | Line 53: | ||
But if you add 1e-5 seconds, it will probably change the objective by very little, maybe by 1e-12 gigawatts, and the optimizer will be in trouble. | But if you add 1e-5 seconds, it will probably change the objective by very little, maybe by 1e-12 gigawatts, and the optimizer will be in trouble. | ||
- | Your days were a better choice (about 86400 times better), giving a change of 1e-7 GW when you add 1e-5 days (about a second). | + | Your first idea (do it in days) was actually |
- | Ultimately you're probably anyway looking | + | Well, look at how the parameter appears |
- | | + | $$ \cos(\eta * \mathtt{phoon})^\beta $$ |
- | so perhaps | + | so a sensible |
- | The point is just to think about how a change in phoon affects the objective. | + | The point is just to think about how a change in '' |
- | === But that's the easy case, what about dimensionless parameters? | + | > But that's the easy case, what about dimensionless parameters? |
Yeah, not an issue. | Yeah, not an issue. | ||
Line 77: | Line 77: | ||
$\def\e# | $\def\e# | ||
- | === Another reason for good scaling: finite difference Jacobian calculation | + | > Another reason for good scaling: finite difference Jacobian calculation |
In many situations, you aren't yet sure enough of your model function $\F(x)$ to have | In many situations, you aren't yet sure enough of your model function $\F(x)$ to have | ||
Line 85: | Line 85: | ||
Let's look at one entry: $J_{ij} = \frac{\partial F_i}{\partial x_j}$, and approximate it using the limit definition. | Let's look at one entry: $J_{ij} = \frac{\partial F_i}{\partial x_j}$, and approximate it using the limit definition. | ||
- | The vector $\e nk$ is the unit vector in $\R^n$ with a one in the $k^\text{th}$ element and zeros elsewhere, | + | The vector $\e nj$ is the unit vector in $\R^n$ with a one in the $j^\text{th}$ element and zeros elsewhere, |
and $F_i(x)$ is the $i^\text{th}$ component of $\F(x)$. | and $F_i(x)$ is the $i^\text{th}$ component of $\F(x)$. | ||
Line 108: | Line 108: | ||
So. In conclusion. | So. In conclusion. | ||
+ |