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

gnn_bfgs.h File Reference

#include "gnn_line_search.h"
#include "gnn_trainer.h"

Include dependency graph for gnn_bfgs.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Data Structures

struct  _gnn_bfgs

Defines

#define GNN_BFGS_TOL   0.0001
 Default precision for line search procedures.

#define GNN_BFGS_STEP   0.1
 Default bracketing step taken by the line search procedures.

#define GNN_BFGS_RESTART   100
 Default restart.

#define GNN_BFGS_ALPHA   gnn_line_search_brent
 Default line search procedure.


Typedefs

typedef double(* gnn_bfgs_beta )(gnn_trainer *trainer)
 Type for evaluation procedures.

typedef _gnn_bfgs gnn_bfgs
 Conjugate gradients trainer structure.


Functions

gnn_trainergnn_bfgs_new (gnn_node *node, gnn_criterion *crit, gnn_dataset *data)
 Creates a new BFGS trainer.

int gnn_bfgs_set_tol (gnn_trainer *trainer, double tol)
 Sets the precision tolerance for the line search procedure.

double gnn_bfgs_get_tol (gnn_trainer *trainer)
 Gets the tolerance for the line search procedure.

int gnn_bfgs_set_step (gnn_trainer *trainer, double step)
 Sets the initial step for the interval bracketing procedure.

double gnn_bfgs_get_step (gnn_trainer *trainer)
 Gets the initial step for the interval bracketing procedure.

int gnn_bfgs_set_restart (gnn_trainer *trainer, size_t restart)
 Sets the number of iterations before restarting.

size_t gnn_bfgs_get_restart (gnn_trainer *trainer)
 Gets the number of iterations before reinitializing the direction.

int gnn_bfgs_set_line_search (gnn_trainer *trainer, gnn_line_search_type lsearch)
 Sets the line search procedure.

gnn_line_search_type gnn_bfgs_get_alpha (gnn_trainer *trainer)
 Gets the installed line search procedure.


Function Documentation

gnn_line_search_type gnn_bfgs_get_alpha gnn_trainer   trainer
 

Parameters:
trainer  A pointer to a gnn_bfgs : Broyden-Fletcher-Goldfarb-Shanno Algorithm..
Returns:
Returns a pointer to the installed line-search procedure.

Definition at line 587 of file gnn_bfgs.c.

size_t gnn_bfgs_get_restart gnn_trainer   trainer
 

This function returns the number of iterations executed by the BFGS trainer before reinitializing the search direction.

Parameters:
trainer  A pointer to a gnn_bfgs : Broyden-Fletcher-Goldfarb-Shanno Algorithm..
Returns:
Returns the number of iterations.

Definition at line 532 of file gnn_bfgs.c.

double gnn_bfgs_get_step gnn_trainer   trainer
 

Parameters:
trainer  A pointer to a gnn_bfgs : Broyden-Fletcher-Goldfarb-Shanno Algorithm..
Returns:
The trainer's internal step.

Definition at line 481 of file gnn_bfgs.c.

double gnn_bfgs_get_tol gnn_trainer   trainer
 

Parameters:
trainer  A pointer to a gnn_bfgs : Broyden-Fletcher-Goldfarb-Shanno Algorithm..
Returns:
Returns the tolerance's value.

Definition at line 433 of file gnn_bfgs.c.

gnn_trainer* gnn_bfgs_new gnn_node   node,
gnn_criterion   crit,
gnn_dataset   data
 

This function creates a new BFGS trainer (gnn_bfgs : Broyden-Fletcher-Goldfarb-Shanno Algorithm.).

Parameters:
node  A pointer to a gnn_node.
crit  A pointer to a gnn_criterion : Basic Criterion Function..
data  A pointer to a gnn_dataset : Datasets for Training..
Returns:
Returns a pointer to a new gnn_bfgs : Broyden-Fletcher-Goldfarb-Shanno Algorithm. trainer.

Definition at line 311 of file gnn_bfgs.c.

int gnn_bfgs_set_line_search gnn_trainer   trainer,
gnn_line_search_type    lsearch
 

This function sets a new line search procedure used by the BFGS trainer.

 gnn_trainer *trainer;
 trainer = gnn_bfgs_new (node, crit, data);

 // use the Golden-Section line search
 gnn_bfgs_set_line_search (trainer, gnn_line_search_golden);

Please refer to (Line Search Procedures for Nodes.) for the available line search procedures.

Parameters:
trainer  A pointer to a gnn_bfgs : Broyden-Fletcher-Goldfarb-Shanno Algorithm..
lsearch  A pointer to a line search procedure.
Returns:
Returns 0 if succeeded.

Definition at line 565 of file gnn_bfgs.c.

int gnn_bfgs_set_restart gnn_trainer   trainer,
size_t    restart
 

Parameters:
trainer  A pointer to a gnn_bfgs : Broyden-Fletcher-Goldfarb-Shanno Algorithm..
restart  A stricly positive integer.
Returns:
Returns 0 if succeeded.

Definition at line 501 of file gnn_bfgs.c.

int gnn_bfgs_set_step gnn_trainer   trainer,
double    step
 

Parameters:
trainer  A pointer to a gnn_bfgs : Broyden-Fletcher-Goldfarb-Shanno Algorithm..
step  A stricly positive real value.
Returns:
Returns 0 if succeeded.

Definition at line 453 of file gnn_bfgs.c.

int gnn_bfgs_set_tol gnn_trainer   trainer,
double    tol
 

Parameters:
trainer  A pointer to a gnn_bfgs : Broyden-Fletcher-Goldfarb-Shanno Algorithm..
tol  A stricly positive real value.
Returns:
Returns 0 if succeeded.

Definition at line 405 of file gnn_bfgs.c.


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