GClasses
|
The optimizer seeks to find values that minimize this target function.
#include <GOptimizer.h>
Public Member Functions | |
GTargetFunction (GRelation *pRelation) | |
Takes ownership of pRelation. More... | |
GTargetFunction (size_t dims) | |
virtual | ~GTargetFunction () |
virtual double | computeError (const GVec &vector)=0 |
Computes the error of the given vector using all patterns. More... | |
virtual void | initVector (GVec &vector) |
Sets pVector to an initial guess. The default behavior is to initialize the vector to all zeros. You should override this method if different behavior is desired. More... | |
virtual bool | isStable () |
This method should return true if computeError is deterministic with respect to the vector being optimized. It should return false if the error depends on some state other than the vector being optimized. This mostly affects whether the optimization algorithms are permitted to remember old error values for efficiency purposes. Stable is assumed, so you should override this method if your target function is not stable. More... | |
GRelation * | relation () |
Returns a (smart) pointer to the relation, which specifies the type (discrete or real) of each element in the vector that is being optimized. More... | |
Protected Attributes | |
GRelation * | m_pRelation |
|
inline |
Takes ownership of pRelation.
GClasses::GTargetFunction::GTargetFunction | ( | size_t | dims | ) |
|
virtual |
|
pure virtual |
Computes the error of the given vector using all patterns.
Implemented in GClasses::GNeuralNetTargetFunction, GClasses::GOptimizerBasicTestTargetFunction, and GClasses::OptimizerTargetFunc.
|
virtual |
Sets pVector to an initial guess. The default behavior is to initialize the vector to all zeros. You should override this method if different behavior is desired.
Reimplemented in GClasses::GNeuralNetTargetFunction, and GClasses::OptimizerTargetFunc.
|
inlinevirtual |
This method should return true if computeError is deterministic with respect to the vector being optimized. It should return false if the error depends on some state other than the vector being optimized. This mostly affects whether the optimization algorithms are permitted to remember old error values for efficiency purposes. Stable is assumed, so you should override this method if your target function is not stable.
Reimplemented in GClasses::OptimizerTargetFunc.
|
inline |
Returns a (smart) pointer to the relation, which specifies the type (discrete or real) of each element in the vector that is being optimized.
|
protected |