|
| LLM (unsigned int inputDim, unsigned int outputDim) |
| Creates a new llm with given input and output dimensions. More...
|
|
| LLM (unsigned int inputDim, unsigned int outputDim, unsigned int numCenters, const std::vector< utils::Range< icl32f > > &ranges, const std::vector< float > &var=std::vector< float >(1, 1)) |
|
void | init (unsigned int numCenters, const std::vector< utils::Range< icl32f > > &ranges, const std::vector< float > &var=std::vector< float >(1, 1)) |
| initializes the LLM prototypes with given kernel count More...
|
|
void | init (const std::vector< float * > ¢ers, const std::vector< float > &var=std::vector< float >(1, 1)) |
| initializes the LLM prototypes with given set of kernels More...
|
|
const float * | apply (const float *x) |
| applies the LLM and returns current NET output vector More...
|
|
void | train (const float *x, const float *y, int trainflags=TRAIN_ALL) |
| applies an update step to the net with given net input x and destination output y More...
|
|
void | trainCenters (const float *x) |
| trains the input weights w_in More...
|
|
void | trainSigmas (const float *x) |
| trains the input variances sigma More...
|
|
void | trainOutputs (const float *x, const float *y) |
| trains the output weights w_out More...
|
|
void | trainMatrices (const float *x, const float *y) |
| trains the output slope matrices A More...
|
|
const float * | getErrorVec (const float *x, const float *y) |
| returns the current error vector with respect to a given destination value y More...
|
|
void | setEpsilonIn (float val) |
| sets up learning rate for input weights to a new value (about 0..1) More...
|
|
void | setEpsilonOut (float val) |
| sets up learning rate for output weights to a new value (about 0..1) More...
|
|
void | setEpsilonA (float val) |
| sets up learning rate for slope matrices to a new value (about 0..1) More...
|
|
void | setEpsilonSigma (float val) |
| sets up learning rate for sigmas to a new value (about 0..1) More...
|
|
void | showKernels () const |
| Shows all current kernels to std::out. More...
|
|
unsigned int | numKernels () const |
| returns the current internal kernel count More...
|
|
const Kernel & | operator[] (unsigned int i) const |
| returns a specifice kernel at given index (const) More...
|
|
Kernel & | operator[] (unsigned int i) |
| returns a specifice kernel (unconst version) More...
|
|
bool | isSoftMaxUsed () const |
| returns whether the softmax function for calculation for g_i[x] is used More...
|
|
void | setSoftMaxEnabled (bool enabled) |
| sets whether the softmax function for calculation for g_i[x] is used More...
|
|
virtual | ~Configurable () |
| virtual destructor More...
|
|
| Configurable (const Configurable &other) |
| Copy constructor. More...
|
|
Configurable & | operator= (const Configurable &other) |
| Assignment operator. More...
|
|
void | setConfigurableID (const std::string &ID) |
| sets the ID of this configurable More...
|
|
const std::string & | getConfigurableID () const |
| returns the configurables static ID More...
|
|
bool | isOrderedFlagSet () const |
| returns whether the ordered flag is set More...
|
|
void | deactivateProperty (const std::string &pattern) |
| adds an additional deativation pattern More...
|
|
void | deleteDeactivationPattern (const std::string &pattern) |
| removed a formerly added deactivation pattern More...
|
|
std::vector< std::string > | getPropertyListWithoutDeactivated () const |
| this returns a filtered list of properties (using all filters added by deactivateProperty) More...
|
|
virtual void | adaptProperty (const std::string &name, const std::string &newType, const std::string &newInfo, const std::string &newToolTip) |
| this function can be used to adapt a specific property afterwards More...
|
|
void | registerCallback (const Callback &cb) |
| add a callback for changed properties More...
|
|
void | removedCallback (const Callback &cb) |
| removes a callback that was registered before More...
|
|
void | syncChangesTo (Configurable *others, int num=1) |
| this can be used to let this instance also apply property changes to others More...
|
|
virtual void | setPropertyValue (const std::string &propertyName, const Any &value) |
| sets a property value More...
|
|
virtual std::vector< std::string > | getPropertyList () const |
| returns a list of All properties, that can be set using setProperty More...
|
|
virtual bool | supportsProperty (const std::string &propertyName) const |
| base implementation for property check (seaches in the property list) More...
|
|
virtual void | saveProperties (const std::string &filename, const std::vector< std::string > &propertiesToSkip=EMPTY_VEC) const |
| writes all available properties into a file More...
|
|
virtual void | loadProperties (const std::string &filename, const std::vector< std::string > &propertiesToSkip=EMPTY_VEC) |
| reads a camera config file from disc More...
|
|
virtual std::string | getPropertyType (const std::string &propertyName) const |
| get type of property More...
|
|
virtual std::string | getPropertyInfo (const std::string &propertyName) const |
| get information of a properties valid values More...
|
|
virtual Any | getPropertyValue (const std::string &propertyName) const |
| returns the current value of a property or a parameter More...
|
|
virtual std::string | getPropertyToolTip (const std::string &propertyName) const |
| returns the tooltip description for a given property More...
|
|
virtual int | getPropertyVolatileness (const std::string &propertyName) const |
| Returns whether this property may be changed internally. More...
|
|
|
void | init_private (unsigned int inputDim, unsigned int outputDim) |
|
const float * | updateGs (const float *x) |
| possible usefull utility function (internally used) More...
|
|
void | trainCentersIntern (const float *x, const float *g) |
| internal training function for the input weights/prototypes More...
|
|
void | trainSigmasIntern (const float *x, const float *g) |
| interal training function for the sigmas More...
|
|
void | trainOutputsIntern (const float *x, const float *y, const float *g, const float *dy, bool useDeltaWin) |
| internal training function for the output weights More...
|
|
void | trainMatricesIntern (const float *x, const float *y, const float *g, const float *dy) |
| internal training function for the slope matrices A More...
|
|
const float * | applyIntern (const float *x, const float *g) |
| internal apply function More...
|
|
const float * | getErrorVecIntern (const float *y, const float *ynet) |
| internal function to return the current error vector More...
|
|
|
typedef Function< void, const Property & > | Callback |
| Function type for changed properties. More...
|
|
static std::string | create_default_ID (const std::string &prefix) |
| this function can be used in subclasses to create a default ID More...
|
|
static Configurable * | get (const std::string &id) |
| returns configurable by given ID More...
|
|
static void | register_configurable_type (const std::string &classname, Function< Configurable * > creator) |
| registers a configurable type More...
|
|
static std::vector< std::string > | get_registered_configurables () |
| returns a list of all registered configurable classnames More...
|
|
static Configurable * | create_configurable (const std::string &classname) |
| creates a configurable by given name More...
|
|
void | addProperty (const std::string &name, const std::string &type, const std::string &info, const Any &value=Any(), const int volatileness=0, const std::string &tooltip=std::string()) |
| This can be used by derived classes to store supported properties in the internal list. More...
|
|
void | addChildConfigurable (Configurable *configurable, const std::string &childPrefix="") |
| This adds another configurable as child. More...
|
|
void | removeChildConfigurable (Configurable *configurable) |
| removes the given child configurable More...
|
|
Property & | prop (const std::string &propertyName) |
| this CAN be used e.g. to store a property value in internal property-list More...
|
|
const Property & | prop (const std::string &propertyName) const |
| this CAN be used e.g. to store a property value in internal property-list More...
|
|
| Configurable (const std::string &ID="", bool ordered=true) |
| create this configurable with given ID More...
|
|
void | call_callbacks (const std::string &propertyName, const Configurable *caller) const |
| calls all registered callbacks More...
|
|
std::vector< Callback > | callbacks |
| internally managed list of callbacks More...
|
|
Local Linear Map implementation (LLM)
The LLM-network (Local Linear Maps) is a very powerful regression network that uses a superposition of linearily weighted gaussians as regression model:
Net Function y=f(x)
where each kernel i is defined by a kernel function that is weighted linearily using . is the location in the input space, where kernel i is centered, and resp. are parameters of a linear weighting function.
Here, normalized Gaussians are always used a kernel functions:
Training of input weights and variances(unsuperwised)
The kernel centers (also refered as data prototypes) can be initialized randomly e.g. using a uniform distribution in input data space or by a set of given prototypes. The prototypes can be adapted while the network training process using means of vector quantisation (e.g. KMeans) externally or by using the following internally implemented update rule:
and
Note: For some initial tries, it turned out, that updating the kernel radii is rather unstable.
Training of output weights and matrices (superwised)
Training rules for output weights and matrices are obtained by simple gradient descent approach (given input tuple ):
and
Hacks
- Delta A_i use sqrt of demonimator (???)
TODO
- check for initialized first or initialized later again
- check if initialized at all (in train...)
- enable soft-max on/off
- provide an interface for Batch based VQ using (EM-Algorithm or something like that)