Question: Implement the pattern search method using one of the fixed direction sets Dn (e.g. the coordinate direction set or the simplex set). Use the sufficient

Implement the pattern search method using one of the fixed direction sets Dn (e.g. the "coordinate direction set" or the "simplex set"). Use the sufficient decrease function ρ(t) = 0. Set some suitable hyperparameter values for γtol, θ and φ at the beginning of your function.

function [ alpha ] = Armijo_LS(f, df, p, x, alpha, rho, c)
% f: vector->scalar function -- the objective
% df: gradient function
% p: search direction; must satisfy that A) it is a descent direction at starting point x and B) norm(p)=1
% x: starting point
% alpha: initial (maximal) step length
% rho: step lenght multiplier
% c: descent condition multiplier
% This method performs a single linesearch on f in the descent direction p and returns the chosen step length;
%terminates when the Armijo condition is first satisfied w.r.t. input parameters alpha, rho and c.

f0 = f(x);
g0 = df(x);
x0 = x;
x = x0 + alpha * p;
fk = f(x);

% repeat until the Armijo condition is satisfied
while fk > f0 + c * alpha * (g0'*p)
alpha = rho * alpha;
x = x0 + alpha * p;
fk = f(x);
end
end

Step by Step Solution

3.44 Rating (167 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

The question is complete but its more of a programming question than a mathematical one focused on t... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!