We showed optimization methods applicable to functions with a single variable (i.e functions are defined in
one-dimensional space). The Newton-Multi optimization method extends this concept to find the minimum of a function
with multiple variables.
Algorithm Creation
The basic idea is simple:
Start with an initial array, which represents initial points in n-dimensional space.
For each variable, i.e xn, minimize the multi-variable function f(x),
where x is a n-dimensional vector.
Loop over all the variables.
The minimization along a line with a single variable can be accomplished with one-dimensional optimization algorithm. We
applied the Newton optimization.
Testing the Multi-Newton Method
To test it out, we find the minimum of a function with multiple variables, given by:
f(x,y) = 1.5 (x - 0.5)2 + 3.4(y + 1.2)2 + 2.5
|
static void TestMultiNewton();
{
ListBox1.Items.Clear();
ListBox2.Items.Clear();
double result = Optimization.multiNewton(f1, xarray, 1.0e-5);
ListBox1.Items.Add("x = " + result.ToString());
ListBox2.Items.Add("f1(x) = " + f1(result).ToString());
}
|