Main Page   Modules   Data Structures   File List   Data Fields   Globals   Related Pages  

Line Search Procedures for Nodes.
[Nodes]


Detailed Description

This module contains a set of line search procedures for a gnn_node. A line search procedure is a one-dimensional minimization algorithm, with tries to find a minimum in a given direction.

This module tries to factorize the common features available in trainers that need line search procedures during training. It isn't implemented yet.

Defines

#define GNN_GOLDEN_LIMIT   100.0
 Golden Section maximum magnification for parabolic fit.

#define GNN_GOLDEN_TINY   1.0e-20
 Golden Section tiny value.

#define GNN_GOLDEN_OLD   1.61803399
 Ratio for Golden Section interval magnification.

#define GNN_GOLDEN_R   0.61803399
 Golden Ratios.

#define GNN_GOLDEN_C   (1.0 - GNN_GOLDEN_R)
 Golden Ratios.

#define GNN_BRENT_ITMAX   100
 Maximum number of iterations for Brent's line search.

#define GNN_BRENT_CGOLD   0.3819660
 Golden Ratio.

#define GNN_BRENT_ZEPS   1.0e-10
 Small number that protects against too much fractional accuracy.


Typedefs

typedef double(* gnn_line_search_type )(gnn_line *line, size_t s, size_t n, double ax, double bx, double cx, double *xmin, double tol)
 The type of line search routines.


Functions

double gnn_line_search_charalambous (gnn_line *line, size_t s, size_t n, double ax, double bx, double cx, double *xmin, double tol)
 Simple line search procedure.

double gnn_line_search_simple (gnn_line *line, size_t s, size_t n, double ax, double bx, double cx, double *xmin, double tol)
 Simple line search procedure.


Define Documentation

#define GNN_BRENT_CGOLD   0.3819660
 

Definition at line 82 of file gnn_line_search.h.

#define GNN_BRENT_ITMAX   100
 

Definition at line 76 of file gnn_line_search.h.

#define GNN_BRENT_ZEPS   1.0e-10
 

Definition at line 88 of file gnn_line_search.h.

#define GNN_GOLDEN_C   (1.0 - GNN_GOLDEN_R)
 

Definition at line 70 of file gnn_line_search.h.

#define GNN_GOLDEN_LIMIT   100.0
 

Definition at line 46 of file gnn_line_search.h.

#define GNN_GOLDEN_OLD   1.61803399
 

Definition at line 58 of file gnn_line_search.h.

#define GNN_GOLDEN_R   0.61803399
 

Definition at line 64 of file gnn_line_search.h.

#define GNN_GOLDEN_TINY   1.0e-20
 

Definition at line 52 of file gnn_line_search.h.


Typedef Documentation

typedef double(* gnn_line_search_type)(gnn_line *line, size_t s, size_t n, double ax, double bx, double cx, double *xmin, double tol)
 

This is the type of line search routines in libgnn. The first, grad contains the node's information with all the needed buffers. The triple ax, bx and cx bracket an appropiate interval which contains a minimum. tol is the precision tolerance. The returned values are: the minimum abscissa , returned in xmin; and the value of the node's function .

Definition at line 104 of file gnn_line_search.h.


Function Documentation

double gnn_line_search_charalambous gnn_line   line,
size_t    s,
size_t    n,
double    ax,
double    bx,
double    cx,
double *    xmin,
double    tol
 

Todo:
Not implemented yet.
Parameters:
line  A pointer to a Evaluations. buffer.
s  The index of the first pattern in the minibatch to be evaluated.
n  The size of the minibatch to be evaluated.
ax  Initial point of the bracketing triplet.
bx  Middle point of the bracketing triplet.
cx  Last point of the bracketing triplet.
xmin  The location of the minimum.
tol  Fractional precision tolerance.
Returns:
Returns the minimum function value.

Definition at line 463 of file gnn_line_search.c.

double gnn_line_search_simple gnn_line   line,
size_t    s,
size_t    n,
double    ax,
double    bx,
double    cx,
double *    xmin,
double    tol
 

This function implements a simple but robust line search routine. It returns the , where

is minimized.

The strategy is the following:

  • Start with a fixed
  • Compute , ,
  • If , then proceed to interpolate.
  • If , then and retry.
  • If , then and retry.
The interpolation is performed by a quadratic polynom:

where the coefficients are

which gives the solution for :

Parameters:
line  A pointer to a Evaluations. buffer.
s  The index of the first pattern in the minibatch to be evaluated.
n  The size of the minibatch to be evaluated.
ax  Initial point of the bracketing triplet.
bx  Middle point of the bracketing triplet.
cx  Last point of the bracketing triplet.
xmin  The location of the minimum.
tol  Fractional precision tolerance.
Returns:
Returns the minimum function value.

Definition at line 510 of file gnn_line_search.c.


Generated on Sun Jun 13 20:51:43 2004 for libgnn Gradient Retropropagation Machine Library by doxygen1.2.18