SMICA  1.0
Public Member Functions | List of all members
smica.optim.Interval Class Reference

Public Member Functions

def __init__
 
def upB
 
def plotdirection
 
def stepok
 
def exchange
 
def bracket
 
def secante
 
def dichotomic
 

Detailed Description

Line search interval.

An Interval is made of two step values (x axis) which brackets
the minimum criterion value (y axis) along the conjugate direction.
Those two steps are found to be first derivative opposite signs.

Constructor & Destructor Documentation

def smica.optim.Interval.__init__ (   self,
  x0,
  d0,
  f,
  fprime,
  minstep = 1e-7,
  fx0 = None,
  fprimed0 = None,
  args = None,
  armijo = 0.01,
  mingain = 10,
  secmaxiter = 1,
  dicmaxiter = 25 
)
Initialize A (left hand side point) and B (right hand side point) with 0 and 1 step values.

Parameters
----------
x0 : array-like, shape (N, 1). Starting point in the parameters space.
d0 : array-like, shape (N, 1). Criterion first derivative at x0.
f : criterion function.
fprime : criterion first derivative function.
minstep : scalar. Interval must be greater than this value.
fx0 : scalar. Criterion value at x0.
fprimed0 : scalar. Criterion first derivative at x0 dot the conjugate direction.
args : optionnal arguments to pass to criterion and derivative functions.
armijo : scalar. Armijo criterion considered in the dichotomic method.
mingain : scalar. Minimum criterion gain considered in the secante method.
secmaxiter : scalar. Maximum number of iterations of secante line search method.
dicmaxiter : scalar. Maximum number of iterations of dichotomic line search method.

Member Function Documentation

def smica.optim.Interval.bracket (   self,
  f,
  fprime,
  args = None 
)
Set an interval for which derivatives are of opposite signs.

f : criterion function.
fprime : criterion first derivative function.
args : optionnal arguments to pass to criterion and derivative
functions.
def smica.optim.Interval.dichotomic (   self,
  x0,
  f,
  fprime,
  args = None,
  fx0 = None,
  fprimed0 = None 
)
Find optimal step.

x0 : array-like, shape (N, 1). Starting point in the parameters space.
f : criterion function.
fprime : criterion first derivative function.
args : optionnal arguments to pass to criterion and derivative
functions.
fx0 : scalar. Criterion value at x0.
fprimed0 : scalar. Criterion first derivative at x0 dot the conjugate direction.

Returns
-------
step : scalar, optimal step.
x1 : array-like, shape (N, 1). Optimal point in the parameters space.
fx1 : scalar. Criterion value at x1.
def smica.optim.Interval.exchange (   self)
Change A (left hand side point) to B (right hand side point).
def smica.optim.Interval.plotdirection (   self,
  f,
  fprime,
  args = None,
  nbP = 50 
)
Plot criterion values along the search direction for steps
between A step point and A step+s point.
     
Parameters
----------
f : criterion function.
fprime : criterion first derivative function.
args : optionnal arguments to pass to criterion and derivative
functions.
s : scalar. Length of step interval to be plotted.
nbP : scalar. Number of points to be computed.
def smica.optim.Interval.secante (   self,
  x0,
  f,
  fprime,
  args = None 
)
Find optimal step using derivatives.

x0 : array-like, shape (N, 1). Starting point in the parameters space.
f : criterion function.
fprime : criterion first derivative function.
args : optionnal arguments to pass to criterion and derivative
functions.

Returns
-------
step : scalar, optimal step.
x1 : array-like, shape (N, 1). Optimal point in the parameters space.
fx1 : scalar. Criterion value at x1.
def smica.optim.Interval.stepok (   self)
Is interval greater than minstep. 
def smica.optim.Interval.upB (   self,
  pB,
  f,
  fprime = None,
  args = None 
)
Update B point.

Parameters
----------
pB : scalar. Right hand side step.
f : criterion function.
fprime : criterion first derivative function. If None,
criterion first derivative at B point dot the conjugate
direction is not updated.
args : optionnal arguments to pass to criterion and derivative
functions.

The documentation for this class was generated from the following file: