GClasses
GClasses::GMinBinSearch Class Reference

Detailed Description

This is a hill climber for semi-linear error surfaces that minimizes testing with an approach like binary-search. It only searches approximately within the unit cube (although it may stray a little outside of it). It is the target function's responsibility to map this into an appropriate space.

#include <GGridSearch.h>

Inheritance diagram for GClasses::GMinBinSearch:
GClasses::GOptimizer

Public Member Functions

 GMinBinSearch (GTargetFunction *pCritic)
 
virtual ~GMinBinSearch ()
 
virtual const GVeccurrentVector ()
 Returns the best vector yet found. More...
 
virtual double iterate ()
 Try another random vector. More...
 
- Public Member Functions inherited from GClasses::GOptimizer
 GOptimizer (GTargetFunction *pCritic)
 
virtual ~GOptimizer ()
 
void basicTest (double minAccuracy, double warnRange=0.001)
 This is a helper method used by the unit tests of several model learners. More...
 
double searchUntil (size_t nBurnInIterations, size_t nIterations, double dImprovement)
 This will first call iterate() nBurnInIterations times, then it will repeatedly call iterate() in blocks of nIterations times. If the error heuristic has not improved by the specified ratio after a block of iterations, it will stop. (For example, if the error before the block of iterations was 50, and the error after is 49, then training will stop if dImprovement is > 0.02.) If the error heuristic is not stable, then the value of nIterations should be large. More...
 

Protected Attributes

size_t m_curDim
 
double m_curErr
 
GVec m_pCurrent
 
double m_stepSize
 
- Protected Attributes inherited from GClasses::GOptimizer
GTargetFunctionm_pCritic
 

Constructor & Destructor Documentation

GClasses::GMinBinSearch::GMinBinSearch ( GTargetFunction pCritic)
virtual GClasses::GMinBinSearch::~GMinBinSearch ( )
virtual

Member Function Documentation

virtual const GVec& GClasses::GMinBinSearch::currentVector ( )
inlinevirtual

Returns the best vector yet found.

Implements GClasses::GOptimizer.

virtual double GClasses::GMinBinSearch::iterate ( )
virtual

Try another random vector.

Implements GClasses::GOptimizer.

Member Data Documentation

size_t GClasses::GMinBinSearch::m_curDim
protected
double GClasses::GMinBinSearch::m_curErr
protected
GVec GClasses::GMinBinSearch::m_pCurrent
protected
double GClasses::GMinBinSearch::m_stepSize
protected